Support » Fixing WordPress » can you have different background pictures

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


    Forum Moderator

    your theme might be using body_class() which gives specific css classes for each page, for instance: .page-id-123 with the page ID as numbers;

    in style.css, use it for example: { background: url(images/page123backgr.jpg); } { background: url(images/page159backgr.jpg); }

    or add conditional styles into the head section of your theme (in header.php);


    <style type="text/css">
    <?php if( is_page(123) ) : ?> { background: url(<?php echo get_stylesheet_directory_uri(); ?>/images/page123backgr.jpg); }
    <?php elseif( is_page(159) ) : ?> { background: url(<?php echo get_stylesheet_directory_uri(); ?>/images/page159backgr.jpg); }
    <?php endif; ?>

    details depend on the currently used theme.

    would that be on wordpress to change it or do i go to my host file manager like that



    Forum Moderator

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘can you have different background pictures’ is closed to new replies.