Ready to get started?Download WordPress


Background colors like example? (6 posts)

  1. moonlitdreamer
    Posted 4 years ago #

    Hello, does anyone have any idea how to achieve this effect? http://jenniferegan.com If you click on a (category) at the top, the whole background color changes for each one. Im assuming these are all categories as they have sub pages and posts??

    Any help will be
    Much appreciated!

    Thank you!

  2. it seems, that this theme uses the page name (or page ancestor name, resp.) as a css class in the #main div; to style the background colors accordingly. all seems to be organized as pages, and child pages, etc.

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    That site is using custom page templates for each of those listings along with what looks like custom CSS classes on the enclosing div to apply the background color. You could probably achieve the same effect using using individual category templates or some category conditionals to apply custom classes in a master category template.

  4. moonlitdreamer
    Posted 4 years ago #

    Thank you! I will give it a try :-)

  5. moonlitdreamer
    Posted 4 years ago #

    I cant seem to get this to work, does anyone have actual examples of code and where I should put it?? :) Just learning!

  6. it might be easier if you could explain in more detail what you have tried so far;
    maybe paste the code of your index.php(?) - or the file you were working on - into a http://wordpress.pastebin.com/ and post the link to it here.
    or post a link to your site?

Topic Closed

This topic has been closed to new replies.

About this Topic