Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using meteor-slides plugin to make header as a slideshow. I am using twenty-eleven theme. Now i need to make this slideshow for my homepage only and featured images of other pages as headers for the respective pages. Can anyone help me with this?

share|improve this question

2 Answers 2

In your header.php check if you are an the front page:

if ( is_front_page() or is_home() )
{
    # your slider code here
}
else
{
    # your regular code
}

The front page is the top page, eg. http://example.com/. The home page is the page for your blog posts. That can be the same as your front page or a custom page like http://example.com/news/. See Settings/Reading in WP admin.

share|improve this answer
    
But how does that display the featured image as the header image on any page or post? –  Brad Dalton Jan 5 at 14:42
    
@BradDalton By putting the regular featured image code into the else block? –  toscho Jan 5 at 14:44
up vote 0 down vote accepted

I have got answer for it. I have changed the code to add meteor slides plugin in functions.php to show the slideshow just in the homepage.

<?php if ( is_front_page() ) {
    if ( function_exists( 'meteor_slideshow' ) ) { 
             meteor_slideshow(); 
        }
} ?>

After that i used a plug called WP display header to set header image for each page

share|improve this answer
    
But how does that hook the slider into the header from your functions file when there's no header hook in the code? –  Brad Dalton Jan 5 at 12:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.