[Theme: Twenty Eleven] Showcase Featured Slider in Header
-
Hi there
I’ve successfully replaced the standard header image with the featured post slider from the Showcase page on my home page.
To do this, I’ve just (in a child theme) amended header.php as follows
if (is_home()) { [pasted in the featured code from showcase.php ] } else { [existing code, so the default header images display on other page ] }
I’ve tidied up a couple of CSS glitches and have got the JS working, but I have hit one stumbling block: global $feature_class in content-featured.php doesn’t seem to work when called from my child theme’s header.php. As such, what should look like this:
<article id="post-29" class="post-29 post type-post status-publish format-standard hentry category-environment feature-image large">
Looks like this:
<article id="post-29" class="post-29 post type-post status-publish format-standard hentry category-environment">
That is, it doesn’t seem to be populating the feature class correctly. If I edit the HTML using Firebug to include the class, the correct CSS is applied and it works beautifully.
Could anyone offer a tip on how to get the feature class to define properly?
- The topic ‘[Theme: Twenty Eleven] Showcase Featured Slider in Header’ is closed to new replies.