[wp-hackers] Pagination: How to display sidebar content on front page only?

Jeremy Clarke jer at simianuprising.com
Mon Jan 18 16:33:14 UTC 2010


On Wed, Jan 13, 2010 at 5:22 AM, Tiago Relvao <trelvao at workmedia.pt> wrote:
> Just a reminder... Don't forget there is a template file - home.php. You can
> use it to further customize your home page.
>
> If you want to change more than a sidebar it's best not to use conditional
> tags as things may get confuse and difficult to maintain. You can copy your
> template index.php and call it home.php as a base for your development.

The idea that more templates is easier to maintain than conditionals
is up for debate. I personally think that if you can understand basic
PHP the benefits of having less files to maintain (and less places to
migrate any HTML changes to) far outweighs the complexity of managing
context conditionals. In my experience it actually causes me to clean
up my code and think of my template more intelligently because I can
see how X in my home.php template is really the same kind of thing as
Y in my index.php template, and thus should be in the same part of the
theme. archive.php FTW

Anyway, it's good to remember that you have lots of options ;)


-- 
Jeremy Clarke | http://jeremyclarke.org
Code and Design | http://globalvoicesonline.org


More information about the wp-hackers mailing list