Setting the slider to display ONLY on the homepage

In BindTuning themes for WordPress, when you need to add a slider exclusively to the homepage, just follow the steps below:

1 – Go to the Editor in WP-Admin;

                Appearance -> Editor;

                                OR

                My Sites -> Network Admin -> Themes -> YourCustomThemeName (Option EDIT)

2 – Select file "header-LAYOUT.php";

LAYOUT corresponds to the layout you selected on BindTuning elements -> Layout & Blog.
For example, if you selected layout "Home", you must look for file "header-Home.php".

3 – Search for the following code

<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('SLIDERZONE') ) : ?><?php endif; ?>

This code indicates that there is a content zone where the slider code will be loaded into. SLIDERZONE name may differ from theme to theme. Make sure to select the zone name where you will be placing the slider in.

4 – Wrap all content of the slider zone with a conditional tag (is_front_page()), like in this example:               

<?php if( is_front_page() ) { ?>
    <div id="layout-slider">
        <div class="container">
            <div id="SLIDERZONE" class="SLIDERZONE"><?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('SLIDERZONE') ) : ?><?php endif; ?></div>
        </div>
    </div>
<?php } ?>

Make sure to change all SLIDERZONE text to the zone name where you actually place the slider.

 

BE EXTREMELY CAREFUL WHEN MAKING CODE CHANGES IN THE EDITOR, MAKE SURE TO WRITE CODE SYNTAX CORRECTLY.

Have more questions? Submit a request

Comments

Got a question?

If you can't find the answer to your question, you can contact us.
We are here and happy to help.

Powered by Zendesk