• Resolved rubbershark

    (@rubbershark)


    Hi guys, I’m trying to change the background image on my WordPress theme ‘blackboard’.

    Here’s a link to my site:
    https://www.anchorhotelhaydonbridge.com/newsite/

    I’ve tried creating different templates but that hasn’t worked. I’m now looking at using just one ‘header.php’ file and swapping the image using a body class depending on the page id.

    Any ideas guys? Any help is much appreciated.

    Paul

Viewing 1 replies (of 1 total)
  • Thread Starter rubbershark

    (@rubbershark)

    Ok guys, I’ve actually sorted this out!

    What I did was add this line of code to my header.php file in place of the body tag:
    <body <?php if (function_exists(‘body_class’)) body_class(); ?>>

    I then created a line of code in the css file for each page id. Here’s an example:
    .page-id-4 { background:#ffffff url(images/main_bg_location.gif) top center repeat-x; font:13px Arial, Verdana, Helvetica, sans-serif; color:#494949; padding:0; margin:0; }

    Hope this helps anyone having similar issues.

    P

Viewing 1 replies (of 1 total)
  • The topic ‘Show a different background image on different pages’ is closed to new replies.