I’m still very new to WordPress and am hoping somebody out there can help me please.
I’m in the process of replacing my old website with one that runs entirely on WordPress (mainly so that I can use the ready made search function which comes with WordPress). I’ve spent ages tweaking various files (which I know very little about) to get the look to match my old website, and am nearly there, but I want to be able to have a different banner image for each blog post (and page come to that).
I’ve already done some digging on Google and in these here forums, but the only solution I can really get my head around is to create a <div> tag in my stylesheet called ‘banner’ and include a background image for that tag and then include that tag in the single post php file. This kind of works, but obviously it’s only displaying the same image file for each blog post because I’m specifying it in the style sheet. So I’ve removed the background image from the style sheet (while retaining the various positioning attributes) and had hoped to be able to insert a unique image file for each blog post by editing the post using the screen below:
I got to this page by logging into to the admin panel, viewing the relevant post and then selecting ‘Inspect Element’ and then ‘Edit as HTML’ in Safari, but none of the changes I seem to make here appear to get saved, and the file reverts back to normal when I refresh the page.
I’m sure there’s a better (but more complicated) way of doing this but I think this is likely to be beyond my grasp so if anyone can let me know how I can edit from this screen shown above but save the changes as well … I think that might just work?
PS: The URL is http://www.retelevise.com but its very much a work in progress.
have a different banner image for each blog post (and page come to that)
there is no reason why a background approach should not work;
however, you will need to add a style per post / per page into style.css with individual css for the background image (and upload a corresponding image).
alternatively, consider to use the ‘featured image’ for that banner (if you are not using it already for a different purpose), like in Twenty Eleven – try to check if you can extract the coding from header.php of the theme
If you want to have different banner image for each posts or page you can try this plugin Nicasio dynamic header
Thanks for the tips – both of you.
Alchymyth, if I was to continue down the background image approach (as it seems a bit easier for me to understand) do you know how I would go about identifying different posts in the style sheet so as to target a different image for each one please? Its just at the moment the style sheet is being applied to all posts so is pulling the same background image for each one.
- The topic ‘Banner Images’ is closed to new replies.