[wp-hackers] Mille viae ducunt homines per saecula index.php
mickyhulse.lists at gmail.com
Wed Apr 17 18:28:31 UTC 2013
Hi Otto! Thanks for the help, I really appreciate it!
Thanks to everyone for the help as well.
On Wed, Apr 17, 2013 at 6:40 AM, Otto <otto at ottodestruct.com> wrote:
> This is not an uncommon line of thinking, but it is a very
> programmer-oriented approach. Programmers understand if-statements and
> conditionals just fine, and so this approach where they
> don't-repeat-themselves in terms of duplicated code appeals to them.
That was definitely a motivating factor for me to ask the group.
> The thing is that normal people are far more comfortable with having
> separate files to do separate tasks, and have no problems with
> repeating themselves. Endlessly, sometimes. Watch somebody who does a
> lot of document or spreadsheet work on a regular basis and see how
> they handle it. Lots of copy-pasta going on there.
Hehe, that's an interesting observation!
I hate to admit it, but I've never really watched, or helped, someone
totally new to a blog/cms like Wordpress.
I do have a co-worker that's keen on creating more complex
spreadsheets though, so I'll have to look over his shoulder the next
time he's making one.
> In my opinion, themes should use separate template files whenever
> possible, simply because separation of sections is easier to
> understand for the non-programmer. It's easier to show somebody a site
> in "parts" and then show them which files control which parts than to
> have to try to explain PHP embedding in HTML, branching, conditional
> logic, and all those concepts.
That's definitely a good reason to utilize the system that's already in place.
For the theme I'm currently working on, it's for my workplace and not
going to be for public consumption, just in-house.
With that said, I need to remind myself that I may not always be here
to maintain the code, and I know from experience that custom code can
be a burden to bear down the road depending on many factors (like if
WP considerably changes parts of its core system/API, or if someone
else ends up maintaining the code - I can't guarantee they'll have the
proper level of PHP knowledge to keep the site/multisite running
Especially, in the industry I'm in, resources and manpower are
limited, so I can't even guarantee there will be a web guy around to
keep things in shape.
> And yes, end-users are the ones that
> are going to be editing their themes, like it or not. If they want to
> make minor customizations in wording, or layout, or they want to do
> the latest SEO-trick-of-the-week, then they're eventually going to
> want to screw with the HTML directly. Best to make that easier.
Great points. Thank you for sharing! :)
> Also, consider child-themes. Much easier to do if you have lots of
> separate templates.
Awesome, that's an area of theme dev that I have not explored much yet.
Thanks (to you, and everyone else who replied) for the pro advice, I
really appreciate it.
Have a nice day!
More information about the wp-hackers