Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #165899

    I would like to add a small slider banner as an ad at the top of my blog page below the menu. Something like the banner found in this demo page: http://kriesi.at/themes/enfold/homepage/home-v4-small-slider/

    I am building a demo page for the site at this url: http://wilberforcemusic.com/

    I would like it to appear at the top of every blog page in a similar fashion to how I have used banners on my current website: http://buriendaily.com/

    Any help would be awesome! Thanks!

    #166458

    Hey wendlandm!

    Here’s an idea, create the slider you want using the Magic wand tool in any page, copy the generated shortcode.

    Open header.php and create a conditional like this (at the end of the file), and with the help of the do_shortcode function we can embed the shortcode previously created:

    <?php if(is_page('Blog') || is_single()){
    			echo do_shortcode("[av_slideshow size='entry_without_sidebar' animation='slide' autoplay='true' interval='5'][av_slide id='2348'][av_slide id='2347'][av_slide id='2346'][av_slide id='745'][av_slide id='315'][/av_slideshow]");
    		} ?>

    This will make it appear in every single blog post and in the main blog page, if you want them to appear in category and archive pages you can add is_archive(), is_category() conditionals.

    http://codex.wordpress.org/Conditional_Tags
    http://codex.wordpress.org/Function_Reference/do_shortcode

    Best regards,
    Josue

    #173273

    Josue,

    Thanks! That almost worked.

    I put the code in as you instructed but the banner never came up on the actual blog page, only the individual blog pages.

    I would also like to use LayerSlider WP for the banner instead. The slug for that is just “[layerslider id=”1″]”

    Think this is possible?

    Thanks!

    #174439

    Hi!

    The shortcode for LayerSliders isn’t quite the same so you would need to use the Advanced Layout Editor, turn on the debug mode and get the shortcode from that.

    So add this to your functions.php:

    //set builder mode to debug
    add_action('avia_builder_mode', "builder_set_debug");
    function builder_set_debug()
    {
    	return "debug";
    }

    For the blog page, if its in the header.php it should be showing up on every page on the site as long as the page is using the regular header file.

    Best regards,
    Devin

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Small Slider Banner on Blog Page’ is closed to new replies.