Treehouse: Grow your CSS skills. Land your dream job.

Best method for creating custom pages…?

  • # March 5, 2010 at 12:36 pm

    I’d like to be able to give special features to some of my pages, and I’d like to be able to target the pages individually. My problem is that I don’t know the best way to do so.

    My blog is at and there are five pages. In the theme files there are only two: page.php and archives.php. How best to do this?

    Can I alter the code for each page (using a body id, for example) with the setup as is, or do I need to create templates for the pages for which there are currently none and do it that way.

    Any help would be appreciated.

    Many thanks in advance.

    # March 6, 2010 at 7:32 pm

    This is the css area, not cms.

    I’m not a wordpress boffin, but I would go with styling the page(s) you want to by using the unique class(es) given to the body tag.

    # March 6, 2010 at 8:17 pm

    If just the design is changing, then you can simply use the body id selector to style the pages differently.

    If the structure is changing, I would create different templates.

    # March 7, 2010 at 3:01 am

    Thanks both of you for your replies, and apologies if this is in the wrong section.

    In the end, I wound up going with templates, since my immediate goal was to put a bit of code in my search page and didn’t want it appearing on the other pages of my blog.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.