Support » Plugin: Slideshow » Slideshow in WP2012 header?

  • Resolved Qjoobsian


    Since I am not a code nerd ;0) but just a newbie, I have a question about how to get the slideshow plugin working in the header.

    I got the slideshow working on individual pages but have no idea where to check the twentytwelve style.css for header coding.

    I am looking for the actual code that will make the plugin work in the header (960×250). Once I have the code, it should be easy to past it into the child theme I guess?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Stefan Boonstra


    Yes, it’s not all that hard. The first thing you should do, is going to your slideshow’s settings page. Here you’ll find the information box with the PHP code snippet that’s needed to display that particular slideshow in your theme. Now copy the PHP snippet, it will look something like this:

    <?php do_action('slideshow_deploy', '[The slideshow's ID]'); ?>

    After copying the PHP snippet, go to the theme’s ‘header.php’ file. You can probably edit this file by going to ‘Appearance->Editor’ in the admin pages and clicking on ‘header.php’. This requires writing rights on your server. Or you can go to the actual file, either through an FTP client or your file system.

    In the ‘header.php’ file, look for the ‘</hgroup>’ tag. Add the PHP snippet right below this tag. After saving, the slideshow should be in the right place.

    Ok, looked into that and found the </hgroup> tag.
    It’s in the header.php of the original twentytwelve theme indeed.

    I carried out your php snippet suggestion,removed the originally set header image and the slideshow appeared.
    However, this time the menu is under the header.
    Also, maybe i’ll wait till the update to mobile responsiveness is ready ;0)

    I also wondered about this:
    I am used to: copy from twentytwelve style.css > edit > paste into twentytwelve child theme.
    There is no header.php in the style.css.
    Will adding the php snippet to header.php not be affected by any future updates of the theme and the changes get lost since it’s not in the child?

    Plugin Author Stefan Boonstra


    Yes, adaptions to the theme will be reset after an update to the theme. That’s why it’s sensible to avoid adapting themes that are not created by yourself, unless it’s really necessary, like adding the slideshow to the header. This isn’t that big of an adaption though, so it’s easy to redo this adaption to the theme.

    Overwriting the header.php from a child theme will probably work against theme updates, but the header.php file might miss out on the update and errors may occur because of this.

    It’s a consideration you need to make, I guess.

    Okay, that sounds fair.
    As long as the slideshow on separate pages stay untouched after a theme update it’s fine. Do they ?
    I need to think about the header slideshow.

    Voor nu bedankt en welterusten.

    Plugin Author Stefan Boonstra


    Yes, they do. Posts and pages are stored in the database, and therefore are not affected by WordPress theme updates.

    Graag gedaan, welterusten!

    this really helped me, thank you!

    Hello Stefan,
    This has been perplexing me for several days now.
    I finally came upon your conversation above.
    I have looked EVERYWHERE in the raindrops theme (header.php, header-front.php, hooks.php) for the </hgroup> tag that you mentioned but couldn’t find it.
    This is quite frustrating… Thanks!

    Plugin Author Stefan Boonstra



    Both the TwentyEleven and the TwentyTwelve theme have the ‘</hgroup>‘ element, but no one theme is the same at the other and the Raindrop theme may simply not use this element.

    You could simply find out where in the header to place your slideshow though. Open your theme’s ‘header.php’ file and add the slideshow’s PHP snippet anywhere after the ‘</head>‘ tag. Save the file, refresh the page and see how it looks. If it doesn’t look right, take out the PHP snippet and place it somewhere else in the ‘header.php’ file. You’re bound to find a good position this way.

    Best regards,

    I attempted to place the code in many different places in the header.php file.
    Didn’t make any difference on the page, and the slideshow never showed up anywhere!

    I really appreciate your suggestions, I’m guessing I chose the least easy theme to make changes to!

    Would you happen to know how to change the footer? I posted the question just a few minutes ago… I looked through the footer.php file, but couldn’t find anything in there to help me.

    Plugin Author Stefan Boonstra


    Changing the footer is like changing the header, searching for the right element to place it in.

    I could possibly point you to where in your theme to place the slideshow code, if you showed me your website.

    Our site is

    I did get help from Nobita on how to make all the pages have different headers.
    (in progress)

    Plugin Author Stefan Boonstra


    I’d say you’d have to place the slideshow’s PHP snippet right below this line:

    <div style="text-align:center;">

    This line may of course look much different in your theme’s header file, as the header may be altered by PHP statements.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Slideshow in WP2012 header?’ is closed to new replies.