[wp-hackers] Mille viae ducunt homines per saecula index.php

Brad Parbs brad at bradparbs.com
Wed Apr 17 01:46:05 UTC 2013

What would you achieve with this?

This basically creates a harder to maintain, harder to edit, and just a 
pain of a project.

It's possible, and I've created themes that just use two files to create 
quick demos of plugins or code, but never an actual site.

If you're at the point where you're checking for is_xxxxx_page, you 
basically are replacing the template system.

Micky Hulse wrote:
> Based on this visual overview of the WP template hierarchy:
> <http://codex.wordpress.org/Template_Hierarchy#Visual_Overview>
> ... all roads appear to lead to index.php.
> Just curious, but has anyone built a theme, or knows of a free theme
> in the wild, that has just one index.php file?
> Based on this info:
> <http://codex.wordpress.org/Theme_Development#Basic_Templates>
> ... at a bare minimum, I'd need:
> * style.css
> * index.php
> This got me thinking, couldn't I build a theme, one that accounted for
> all of the various pages/views, using one index.php and several
> template part includes?
> I can envision an index.php template that utilizes a PHP switch
> statement to load the needed template parts.
> Seems plausible, though, I'd probably need the ability to say things like:
> if (is_search_result_page) { ... }
> if (is_archive_page) { ... }
> if (is_XXXXXXX_page) { ... }
> Now, I've definitely been in situations where I've tried to cram too
> much into a single template, so I can see why this would not be a good
> idea. Just mostly curious to know if others have tried this, and
> whether or not they'd recommend giving it a try.
> Thanks for listening!
> Cheers,
> Micky
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list