Support » Themes and Templates » different backgrounds in wordpress pages

  • iguanna2


    Anyone could help me? I’m trying to have a different background for each page on my wordpress, any idea?

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator



    Elliot Jay Stocks had a post on this sometime back. Scour the web for that. You can hack with CSS, a bunch of jpegs and a little code in the header.



    Forum Moderator

    Something like:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php if(is_page('foo')) $page_style='foo';
    elseif((is_page('bar')) $page_style='bar';
    else $page_style='';
    <div <?php post_class($page_style); ?>>

    should work and generate page specific classes that can then be used to style the background via CSS.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘different backgrounds in wordpress pages’ is closed to new replies.