I have a Wordpress theme I'm modifying (Bouqet, in case you're interested), and I want to get it to show a different banner pic for the different pages. The theme seems to have two stylesheets, one editable in Wordpress theme editor, and a second that is specific to the color scheme I am using. Originally, the header code shown below did NOT have the "style" attribute with a background image. The image is supposed to be defined in the CSS sheet specific to the color scheme. I have modified the html to include an inline style attribute that I want to override the background image defined in the stylesheet. I am trying to use the post ID to determine what page the user is on, and I have named my banner files the number of the post ID. Here is the code in the header.php file that I'm working with:
<header id="branding" role="banner" class="clearfix" style="background-image: url(<?php echo $post->ID; ?>.png);">
...more code here...
The problem that I'm running into is that this only seems to work for one page (it happens to be my main page). All other pages show a blank banner as if it can't find the image. Am I mistaken in my coding or my approach?