Do you really use all those WP theme options? I don't think so - wordpress

There are quite a few days now, since I started to think about creating a WP theme framework backend. Working with wordpress for some time, I studied a lot of themes from "wp theme clubs" and their backend. All settings sections are organised in vertical tabs, nothing more. Same thing again and again and again. I think 90% of the buyers (customers) will never use those options. Am I right or this is just in my mind ?
Should I create a theme backend using the same old/booooooring style or better try to think outside of the box and create some new, intuitive and innovative ?
Thanks.

Even if 90% of your users don't want to customize the theme then you will leave 10% out that would like to customize your theme.
I suggest you implement 2 things to let your users customize things.
theme customizer
Since 3.4 there is the theme customizer. It already works in twentyeleven and twentytwelve.
Take a look at it if you haven't it's quite easy to use for users and can be extended.
Read more:
http://codex.wordpress.org/Theme_Customization_API
http://ottopress.com/2012/making-a-custom-control-for-the-theme-customizer/
http://wp.tutsplus.com/tutorials/theme-development/digging-into-the-theme-customizer-overview/
Actions and filters
You probably used add_action() and add_filter() before. You can add your own filters to your theme so more advanced users can modify stuff. It costs you less effort then making an option of it while keeping your theme easy to modify (for users who know how to code)
Check out some more extensive themes, they are full off do_action() and
apply_filters().
An example. Before you start your loop you might add an do_action('before_content'). Now a user can add an add_action('before_content', 'add_breadcrumbs_callback_fnc');. Now your theme will execute the add_breadcrumbs_callback_fnc function so the user can add breadcrumbs without editing you theme.
Read more:
http://themeshaper.com/2009/05/03/filters-wordpress-child-themes/
http://wp.tutsplus.com/tutorials/the-beginners-guide-to-wordpress-actions-and-filters/
Attempt to introduce a set of default hook for each themes:
http://literalbarrage.org/blog/2012/06/29/wordpress-theme-hook-alliance/
https://github.com/zamoose/themehookalliance

I don't necessarily think the issue is mutually exclusive.
Users with simple needs might want simplicity, right up until options are needed. A broad and ambiguous answer to a open-ended question.
Check out the wp-svbtle theme: https://github.com/gravityonmars/wp-svbtle
He did a separate boiled down back end.

Related

Wordpress Custom Theme - Applying Updates

I haven't been able to look this information up online. Perhaps I am not searching correctly.
I'm looking for information on the best practices. I have a custom built Wordpress theme that I want to implement on several similar websites. On each of the websites, I then intend to implement a child theme so that parts of each site can be customized, while still utilizing the parent theme.
I don't want my parent theme to be downloadable for other users, just myself.
I'm sure that "copying and pasting" the main theme from one of the sites to the others isn't best practice, because if an update needed to be made, I'd have to do it across all the sites. Ideally, I'd like to able to apply an update, and then within the dashboard of each of the sites, just "update" the theme.
What would be the best practice for this? Or am I misinformed about how this all works? Any insight would be appreciated.
You can perhaps try multisite - https://codex.wordpress.org/Create_A_Network.

Advanced Custom Fields in wordpress

I am making my first steps learning to code. I made some courses on Internet and now I am building a Wordpress theme to continue learning from the experience.
The thing is that I am learning how to install a jquery slider plugin and I see that it's necessary to install advanced custom fields plugin and the repeater plugin that is only available in his pro version ($25) and that's not cool...
Now I would like to know if there is some free good plugin with the same functions of advanced custom fields?
I am just starting my experiments with wordpress to learn everything that I need to start building sites, so I don't have the enough experience to know if it worth to pay the $25 for the advanced custom fields plugin or not.
Do you have some suggestion? It will be something useful in the future? Are there other plugins that you recommends to download even if I have to pay for them?
There's so little context around what you're using the slider for and how much the site admins would need to update slides, etc., but I have two comments:
Do you need to use that specific slider? You could rig something up with custom post types, hide the editor and metaboxes, leave only a field for an image upload and whatever meta you like, and have the admin user just add a new post for each slide. Generate those posts in the PHP and have the jQuery slider take it from there. If you're just learning code, that might be more of a challenge, though. I just tend to resist paying for things when there are reasonable alternatives out there.
ACF is a worthwhile plugin. If the general context-free question is "Is ACF worth the $25?", the answer is 100% 'yes.' I use it virtually every day and often wonder how I'd make use without it. In your case, if you have other potential use for the project you're on, then yes, I'd say it's worth it. But still, in the simple context of a jQuery slider, I'm hesitant to purchase it just for that.

Drupal 6: duplicate theme function in two themes

I have a regular and mobile theme for a site; there are currently a couple of duplicate functions in the template.php of each theme, which do some text munging on the same fields. That is, the markup is the same for these fields in both themes.
How can I impose DRY and only have the logic in one place?
I understand I could make the regular theme inherit the mobile theme, but this doesn't seem like a "proper" solution, since the themes are quite different at the end of the day. Even more so as this would require ex-post-facto manipulation of the preprocess functions, and overriding mobile CSS and JS files - seemingly creating as much work and future WTH as it solves.
Thanks!
I would love to see the proper answer for this.
All i can think of is making a module that holds the duplication of functionality. A library module if you will.
So I'm making this "answer" as a conversation starter.
in: (mobile)template.php
preprocess_page(&$vars){
mymodulename_pagepreprocess($vars,'mobile');
}
(desktop)template.php
preprocess_page(&$vars){
mymodulename_pagepreprocess($vars,'desktop');
}
You can have preprocess-functions in modules as well btw. But it might be nice to send witch template as an argument.(you could however extract this from the global $theme)
How about you make a base theme which holds the functions, and implement both as sub-themes of it.
Or just the mobile theme a sub-theme, and the PC theme is the base?
Creating a sub-theme

Wordpress creating custom theme-Reusability

first approach to CMS and wordpress I'm wondering if there's any predefined html structure and classes/IDs "must-be" reference that I can refer for making my own theme willing to change in the future for another wordpress theme
thanks
Luca
There are a few other 'template' themes that could get you started - if Starkers isn't quite your thing, you might find WP Framework a good alternative. Or - just start stripping down the Twenty Eleven theme to give you a base (which is just what the Starkers theme does, using the Twenty Ten theme as a base).
There's also quite a handy first-time guide on the WordPress Codex around theme development if you'd prefer to start from scratch.
Wordpress doesn't require you to have any specific classes or IDs in your theme in terms of the HTML and CSS, the only things WP needs are things like the wp_head function inside your element on every page. Having said that themes such as Starkers were created to enable developers to have a starting point instead of starting from scratch.
Now the above applies only to whatever code you write, there are however some functions in WP that will return standard code, for instance if you don't specifically create the comment thread code, WP will generate it for you, and that is really the only code that many themes will share.
I would say that if you are intending on making a number of blogging themes for instance, having a set of standard code might be a good idea, for the article pages for example, so that you don't have to re-write code over and over. Aside from that the only code I ever reuse when making themes is the CSS to style comments if I don't hand-code the comments section, this is a good idea as it will save you a lot of time.
Wordpress provide some functions which add CSS classes depending of page type, templete, conditional tags . . .etc.
These functions are body_class() and post_class().
For more info check:
http://codex.wordpress.org/Function_Reference/post_class
http://codex.wordpress.org/Function_Reference/body_class

What do you prefer ? Writing a Wordpress plugin or child theme?

What think to be consider when you prefer coding a solution in form of child theme rather then in form of a plugin ?
Themes and plugins solve different problems: plugins are for business logic, themes for presentation. They are not interchangeable. I prefer the right tool for the right job. :)
i prefer in child theme (or in function.php), rather then in form of plugin. It's more easy to reuse. You can just move it from one theme to another.
Any generic functions should be in a plugin. That way, they are available to all themes, and if you make changes in one place, you don't have to copy and paste to several files.
The benefit of a child theme is that you can make changes to an existing theme, such as twentyten, without directly modifying the source code, which is fragile -- it can cause errors and has to be repeated every time the theme is updated.
Depends on the situation. If it's something that could readily be used by any (or many) different sites regardless of the theme, I do a plugin.
If it's something specific to This Particular Site Only, I would probably put it in the child theme's functions.php. Even if specific to the one particular site only, I might make it a plugin if it's something I might want to turn on and off later.
Other than the fact that you can turn plugins on and off, there is little if any difference between code in a plugin and code in functions.php.
If it's something most easily coded straight into the theme (e.g. a particular permutation of the_loop) then of course just do it in the theme template and put supporting code in functions.php

Resources