WordPress.org

Ready to get started?Download WordPress

Forums

Header Image Slider
slider appearance only on home page (12 posts)

  1. jbird2011
    Member
    Posted 2 years ago #

    I Love this plugin! My only issue is that it appears on all pages of my site. If I set the featured image of a particular page, the featured image does appear, but on pages where I don't want a featured image, the page reverts back to the slider. I want certain pages to have no image in the header at all. Can you please provide me with a detailed means of achieving this. I am a novice at PHP and WordPress so please provide as much detail as possible. Thanks in advance!

    http://wordpress.org/extend/plugins/header-image-slider/

  2. shazdeh
    Member
    Plugin Author

    Posted 2 years ago #

    First, insert the boom_header_image() template tag in your template (most likely in header.php file). Then use WP Conditional Tags (http://codex.wordpress.org/Conditional_Tags) to control when it should show up and when not.
    As an example you can do this:
    if( is_home() ) boom_header_image();
    Ta-da! It only appears in the home page. The WP conditional tags are really easy to use and very powerful. Get to know them! :)

  3. jbird2011
    Member
    Posted 2 years ago #

    Thanks so much for the help and the tips. I entered the conditional statement and it works as expected. I now only have the slider on the home page. But now, even if I set a featured image on a non-home page, I get no image at all. I'd like to be able to set a featured image on some pages and no image on others. Here is my header.php file:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thanks again!

  4. shazdeh
    Member
    Plugin Author

    Posted 2 years ago #

    Featured image? For featured images you have to use the the_post_thumbnail() function. You could do it like this:

    if( is_home() ) boom_header_image(); else the_post_thumbnail();

  5. Juanjover
    Member
    Posted 2 years ago #

    Spanish: Hola soy novato, disculpen la molestia, donde y qué código inserto para que me funcione el "Header-Image-Slide". Mi sitio web es http://www.clubunioncomercio.com Gracias por su ayuda. Saludos.

    English: Hello I am newbie, sorry for the inconvenience, where and what code to insert for me to run the "Header-Image-Slide." My website is http://www.clubunioncomercio.com Thanks for your help. Greetings.

  6. shazdeh
    Member
    Plugin Author

    Posted 2 years ago #

    Insert the boom_header_image() function where you want your slider to show up. Open your theme's header.php file and inject the function.

  7. oscarcat
    Member
    Posted 2 years ago #

    Hello, I am also having a problem with this. I set the code like this

    <?php if( is_front_page() ) boom_header_image; else the_post_thumbnail(); if (function_exists('nivoslider4wp_show')) { nivoslider4wp_show(); } ?>

    But when I go to the site, the Featured Image displays either above or below the slider, depending on where I placed the code. Please help!

  8. johann64
    Member
    Posted 2 years ago #

    Hello, (sorry for my bad english)

    I'm a new user of wordpress, i need to show the slide only on home page too, but i don't understand where exactly i have to put the string
    if( is_home() ) boom_header_image();
    in the header.php file
    (I'm using Twenty Eleven theme)

    Thanks for your help!

  9. bvanleeuwen
    Member
    Posted 2 years ago #

    I use the PaperBlock theme. Just adding <?php boom_header_image(); ?> to the header.php file shows the header. Great.

  10. Lesley
    Member
    Posted 1 year ago #

    Like other posters here, I would also like to know exactly where to put the conditional statement <?php if( is_home() ) boom_header_image(); ?>. I have tried it in the header.php (at the end) but it doesn't seem to work and the slider still shows up on all pages (I only want it to appear on the home page). I don't know much about php: please excuse my ignorance. It seems like a great plugin, just need a little help please.

  11. Lesley
    Member
    Posted 1 year ago #

    Not understanding how php or conditional statements work, I was being rather stupid and had the <?php boom_header_image() ?> AND <?php if( is_home() ) boom_header_image(); ?> in the header. I just realised one was contradicting the other. It now works for me.

  12. TimoElshof
    Member
    Posted 1 year ago #

    The plugin works but the codes mentioned above do not work, unfortunaly. I work a Twenty Eleven Child Theme (3.4.1) and this is my website (www.sanneelshof.nl). Can somebody help me?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic