For what it is worth aeroalquimia, the framework you tried that was rejected seems WAY easier to me.
The default wordpress framework makes zero sense to anyone who isn’t already a wordpress developer.
I dare anyone here to take those two screenshots and do some randomized testing. Put them both in front of non-developers and see which ones they would prefer to work with.
I guarantee you it will be aeroalquimia’s first one.
Let me illustrate so no one loses sense of what is being talked about here…
In the past, in order to add a DIV to single.php I would simply open up single.php (using Wordpress’ editor even) and type in the div: div id=”absurd”
16 characters. A few seconds of typing. Done. Couldn’t be easier.
Now, to add that same div to one of these new themes I first have to identify the right function in single.php – these functions are always different from theme to theme – and then I have to start plowing through php files buried in directories – again, always different from theme to theme – to find that function and then interpret how it works and add in some code that outputs the desired DIV
All of that to add 16 characters to single.php. Who exactly does that benefit? Developers? It certainly doesn’t benefit the people who use these themes.
Regardless, if there are any modern, quality themes that utilize this old, apparently no longer proper, but certainly more user friendly and common sense based approach… please let me know. I’ll pay extra for it.
Up until about a year ago, every theme I ever encountered – including themes here on Themeforest – kept the basic HTML structure in the template files.
Wordpress even has a built in editor… anyone remember that?... where you were supposed to be able to edit these template files easily.
When exactly did this so called proper practice change? When did template files become nothing more than shells for functions buried deep in directory structures? And when did an IDE become necessary to make simple HTML edits to wordpress themes?
Pretty frustrated right now and looking for a theme recommendation. I strongly disagree with the direction new themes are going. Burying basic HTML structure and spreading it across dozens of function files that are multiple directories deep is absurd.
I am looking for a quality theme that still utilizes template files the way they used to be used. To house the basic HTML structure, and only utilize more complex functions for more complex purposes.
Changing a simple DIV in single.php should be a 5 second process of editing single.php. Not an hour of finding where the function for theme_content_after () might be hidden.
Any suggestions? There must be some modern, quality themes that have been developed with this common sense approach still in tact.
If not, and if you are a developer, contact me, cause I have a can’t miss business proposition for you.
Personally, I think using the template files naturally (as WordPress intends), and adding in thoughtfully placed hooks and filters, is the best approach. For example, the post page structure and content should be in the template file, but the “About the Author” and other secondary material (think HTML5 asides) make sense to add via hooks.
Yes! I agree. And I feel like this is what themes used to do… a majority of the ones I looked at, just a year or so back, seemed to all do this.
It is interesting to look at the history of specific developers. Their older themes do a great job of including the page structure in the template files, keeping most of the functions in the functions.php, and hooks are reserved for specialty and secondary features. Their newer themes however do what I am complaining about here. So the trend is obvious.
2. Extensibility. Here’s the thing: you shouldn’t be editing a theme directly. You should be creating a child theme to customize your site.
Thanks to everyone for the excellent replies and conversation.
Another thing I do want to address is the topic of child themes.
I see child themes as a reason to NOT do what I am complaining about here.
Child themes allow you to modify the following: The css of a parent, the root level functions file of a parent, and the template files of a parent.
But these new “frameworks” have moved the code out of these files (well, not the css).
Example: A theme I am working with tonight uses the functions file as no more than an index that calls in other function files buried deeper in the theme. The files they are calling are all a few directories deep… in a “lib” folder, for example. Well, if I want to edit those files, I can’t do so in the child theme because they are not part of the functions.php file. I have to edit them in the parent theme.
This is exactly the same problem with the template files. If single.php is nothing more than a few lines of code that call functions buried deeper in the theme… how are you supposed to use a child theme to modify it?
Doesn’t moving code out of the files that a child theme is used to modify defeat a big part of the reason for using a child theme in the first place?
That is a wonderful reply PressCrew. It really helps me understand the mindset, if not the actual rationale.
Part of my disconnect here is clearly that I am not a theme developer. I’m a theme user, so I haven’t faced scenarios where I have to worry about mass producing themes and trying to keep development time down for them. If I had, maybe I would be looking at this differently. All I know is that the time I spend trying to use these products has multiplied by a factor of about 6 (and I would think that as a theme developer that would matter to me… but again, I can’t say for sure cause I am not there)
But more to the issue. I fundamentally fail to see how what I am talking about can really be saving anyone a whole heck of a lot of time or money.
Most of the functions I have been struggling to find and understand this month represent 3 lines of code. Typically: an opening DIV , a line of php, and a closing DIV .
When I finally wade through the hundreds (sometimes thousands) of lines of code to find one of these functions and discover it represents 3 lines of simple, basic code… I just throw my arms up in the air. Why would you pull 3 lines of simple code out of the file where it would logically exist (and oh by the way, where Wordpress’ dashboard editor would allow you to edit it)... and bury it in a function file.
And is that really saving time? It is taking me longer to type this sentence than it would take me to type those 3 lines of code into single.php. And I have to imagine that creating a function to handle those 3 lines of code is more upfront effort. Are there “down the road” time and cost savings that you experience by moving those 3 lines of code out of the template? And if so, is it really worth the hit to accessibility for your users?
A good example of this is a pretty standard “entry” div, or “post” div. Most themes now move those out of single.php and replace them with functions like post_before or something similar.
What’s the state of play regarding underlying code frameworks at the moment? Is every theme developer creating their own framework?
As best as I have been able to tell from the last 6 themes I’ve examined, there is no underlying code framework that everyone is using. Woothemes, which some of you are probably familiar with, are closely mirroring the TwentyTen example. But quite frankly, even that is overly complex and obtuse. I feel like their Canvas theme could be re-written with half the amount of files and functions.
or just ignore the users who want that flexibility – they’re the minority of your customers anyway.
I am still stunned that more people do not require this level of flexibility in their themes, or want to utilize the customization power of the theme concept… such a waste in my opinion to not do so… but I am coming to accept that I am clearly in the minority when it comes to this. Apparently most people really only need/want to change the background color of their site, and stuff like that.
Either way, unfortunately, the above seems to be true. Users like me are increasingly being ignored in favor of this development path, and this has been confirmed when I recently reached out to several theme developers about this issue.
This will illustrate the point I am trying to make here.
I reached out to the author of a very popular theme on Themeforest about this issue. He offered me an example of how I would go about changing the header tag in the post title of his theme’s posts page.
Literally… how do you change the title from an H2, to an H3.
We are talking about 1 character in an HTML tag. I can not think of a more basic or simple edit to a site.
Here is the reply I got:
If you open up wp-content/themes/xxxx/single.php you’ll see that we have functions you can hook into for instance mysite_before_entry() on line #19
Now if you open wp-content/themes/xxxx/framework.php and go to line #162 you can see we’re hooking into the function mysite_before_entry() to output the post title:
add_action( ‘mysite_before_entry’, ‘mysite_post_title’ );
Now if you open wp-content/themes/xxxx/lib/functions/theme.php and do a search for the following function mysite_post_title it will take you to line # 1095
You’ll notice that this whole function is wrapped in:if ( !function_exists( ‘mysite_post_title’ ) ) :
To figure out how to change a Header tag from a 2 to a 3 I have to traverse 3 different files, 1 of which is 3 directories deep, go through several thousand lines of code, and interpret some complex function calls.
To go from H2 to H3!
That should strike everyone as utterly absurd.
ps: I x’d out the name of the theme so as not to make it sound like I am picking on or singling out this one theme. I assure you, this seems to be the new norm with every theme I look at.
Until recently, the HTML structure of a Wordpress site could be found in the template files. Index.php, single.php, etc. CSS and JS was, of course external. And long, involved php was too.
But those template files were the structure of the page they represented. If you needed to make a basic tweak to your posts page, you went to single.php and could easily see the HTML and change it.
This seemed to work just fine and certainly didn’t strike me as a complete mess.
Now, single.php consists of nothing more than a bunch of calls to external functions. If you want to make a very basic HTML edit to the page that single.php represents, you have to first find the function that contains the HTML you care about (not always an easy task) and then find in that file the code that address the HTML tag you care about (also not an easy task).
In a theme I am working on now (a VERY popular theme sold here on Themeforest), in order to add 1 lousy DIV to a page, I first had to find a file buried 3 directories deep and then dig through 3,000 lines of code to find where I could insert that DIV .
THAT , to me is the very definition of complete mess.