Support » Fixing WordPress » background for single post?

  • Resolved Max Sewell



    I’ve used the code below to incorporate a background for the home page and another other pages. I’d like to add the latter image for single posts (single.php). I”m not talking about a post background, but a background for the whole page displaying the post. Can anyone advise?

    Thanks for any help you can give,


    <?php if (is_home()): ?>
    	<style type="text/css">
    	body {background: url(; background-position: left top; background-repeat: no-repeat;}
    <?php elseif (is_page() ): ?>
    	<style type="text/css">
    	body {background: url(; background-position: center top; background-repeat: no-repeat;}
    <?php endif; ?>

    [Please post code snippets between backticks or use the code button.]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘background for single post?’ is closed to new replies.