Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header (http://forum.bytesforall.com/forumdisplay.php?f=43)
-   -   [SOLVED] Specify header image per post (http://forum.bytesforall.com/showthread.php?t=6825)

scurry Apr 21, 2010 07:18 PM

[SOLVED] Specify header image per post
 
I've read over these forums for hours and have not been able to find the solution. I found JuggleDads solution for setting the header image based on category or page (thanks JD), but it does not work on posts, at least not for me.
I am using mod rewrite, so even though my post id number is 641 the url reads as the name of the post. Using the url in my css inserts has been working for the categories.
I've been making my changes in the css inserts section for the categories, and again they work perfect.
Any help is appreciated.

juggledad Apr 22, 2010 06:29 AM

the mod wrwrite doesn't matter. What you want to do is view the page, then view the source of the page and fine the '<body...'statement. This will give you something like this on a single post page
HTML Code:

<body class="single postid-638 logged-in">
you can now use the postid-638 for this post in the css so the headerimage override would be
HTML Code:

body.postid-638 div#imagecontainer {
background-image: url(http://yourdomain.com/wordpress/wp-content/uploads/yourpage.jpg) !important;}


scurry Apr 25, 2010 06:17 AM

Juggledad,

Thanks so much! I was trying post-id instead of postid

You rock!

Thanks again!

Ken


All times are GMT -6. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.