Add Slide Deck Slider In Any Themes Header

Slide deck is one of the best plugins for creating slide shows in WordPress. It offers both a free ‘Lite’ version and premium version. If you want to display custom content or videos in a slider, Slide Deck is the best plugin for this purpose.

I’ve already shown you how to install Easing slider and Soliloquy image sliders in different header area’s and hook locations in any theme.

In this tutorial, i’ll show you how to install and display the content of your Slide Deck slide show anywhere in any theme. The themes used for this tutorial are Twenty Twelve and the Genesis Design Framework.

The below image is a picture of what Slide Deck looks like when pulling YouTube videos into the header of the Twenty Twelve default theme for WordPress.

Click Image To Enlarge

slide deck twenty twelve

Display Slide Deck Site Wide Free Themes

Here’s the code you need to paste into your template file when using a child theme for Twenty Eleven or Twenty Twelve.

Here’s what it looks like in your header template file which should be copied to your child theme.

header template file

If you’re using a premium theme framework like Genesis which includes hooks, you should use this code.

Output Slide Deck Home Page Header Genesis

This code should be pasted at the end of your child themes functions.php file. It includes a conditional tag so it only displays on the home page. It also includes the genesis_header hook so it displays in the header position. Both the conditional tag and hook can be changed.

Don’t forget to replace the i.d in the shortcode with the i.d for the slide show you want to display.

Display Slide Deck Home Page Twenty Twelve

Paste this code in any position in the header.php file. You are advised to copy the header.php file from your parent theme and place it in a child theme. This way the code for the slider and any other custom coding won’t be lost when you update the parent theme files.

Here’s what it looks like in your header template file which should be copied to your child theme.

slide deck home page only

Demo Slide Deck before you install the plugin.

Comments

8 responses to “Add Slide Deck Slider In Any Themes Header”

  1. Thanks- this almost helps- except in my child theme, all of the genesis header hooks have been removed and replace by their custom headers.
    [code]
    remove_action(‘genesis_header’, ‘genesis_do_header’);
    remove_action(‘genesis_header’, ‘genesis_header_markup_open’, 5);
    remove_action(‘genesis_header’, ‘genesis_header_markup_close’, 15);
    [/code]

    I’m trying to add a similar slider (not a Slidedeck, but All Around JQuery Slider), and I want to output the slider after the custom_header.

    Thoughts?

    1. Brad Dalton Avatar
      Brad Dalton

      Hi Dan

      Use the genesis_after_header hook with code like this however you will need to change either the template tag for your slider or the shortcode.

      http://wpsites.net/web-design/image-slider-home-page-only/

      1. Okay so—

        [code]
        function all_around_home() {
        if (is_front_page()) {
        echo do_shortcode(‘[all_around id=”1]’);
        }
        }
        add_action(‘genesis_after_header’, ‘all_around_home’);
        [/code]

        1. Brad Dalton Avatar
          Brad Dalton

          Looks right.

          1. Still breaks the site. *sigh*

            -Dan

          2. Brad Dalton Avatar
            Brad Dalton

            When you pasted it, there was a space which i fixed so please try again.

        2. Thanks for your help, Brad. I figured this out. What I did was enable my theme to use shortcodes in the widget area. Then I registered a new widget called Slider and added that widget to the front page.

          It works!

          1. Brad Dalton Avatar
            Brad Dalton

            Good stuff!

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.