Different Headers for Categories – Need Code Help
-
So I’ve ventured on my own, looking over some other postings, to construct a code that I’ve placed in the header section that would pull a banner for different categories in a post. Once I get this to work, I also intend to modify it for pages, too.
But this is the code I’ve placed in the header section that seems to be ignored at the moment…
<div id=”header” <php if (in_category(8)) echo {‘style=”background: url(http://www.urbanlandscapes.org/wordpress/images/ul-cat-charts.png) no-repeat;”‘};
elseif(in_category(1)) echo {‘style=”background: url(http://www.urbanlandscapes.org/wordpress/images/ul-cat-news.png) no-repeat;”‘};
elseif(in_category(9)) echo {‘style=”background: url(http://www.urbanlandscapes.org/wordpress/images/ul-cat-playlists.png) no-repeat;”‘};
elseif(in_category(2)) echo {‘style=”background: url(http://www.urbanlandscapes.org/wordpress/images/ul-cat-reviews.png) no-repeat;”‘};
elseif(in_category(12)) echo(‘style=”background: url{http://www.urbanlandscapes.org/wordpress/images/ul-cat-podcasts.png) no repeat;”‘;} ?>>
</div>I’ve moved the banner images to the same directory as the WordPress root. Other than that, not sure what I’m missing. Any help would be appreciated….thanks.
Velanche
The topic ‘Different Headers for Categories – Need Code Help’ is closed to new replies.