• Resolved Lancerubin

    (@lancerubin)


    Using the snipit to Add content above featured pages, I want to add a metaslider below the current slider, but above the featured pages circles. The meataslider gives me the following shortcode to embed [metaslider id=201], but then all I see is the shortcode, not the slider itself. I can get the snipit to work fine if I just want to see a headline or other text, but cannot get the metaslider to appear. Thanks in advance for your help.

    https://www.kbla.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • Remove the snippet code and add the following to the functions.php of your child theme:

    // Add metaslider after the header in the front page of site
    add_action ('__after_header' , 'add_metaslider_to_front_page');
    function add_metaslider_to_front_page() {
    	if ( is_front_page() ) {
    		echo do_shortcode('[metaslider id=201]');
    	}
    }

    Thread Starter Lancerubin

    (@lancerubin)

    ElectricFeet, thank you for your quick reply. The metaslider now works, but the metaslider is above the Customizer slider, and I want to place the metaslider below the Cutomizr slider so that both are showing at the same time (and both are above the Feature Pages circles). The metaslider will be a “Ticker Tape” style ribbon and is intended to replace the current words “Kiesel Law LLP has recovered over … ” https://www.kbla.com Thanks for your help

    Well the slider is added with default priority, which is 10. If you change the priority of MetaSlider to 15 with:
    add_action ('__after_header' , 'add_metaslider_to_front_page', 15);
    it should show up later.

    Thread Starter Lancerubin

    (@lancerubin)

    ElectricFeet, you are the best. Thanks

    ??

    mayurmarwa

    (@mayurmarwa)

    I have followed these steps and added a slider in my header.I already have a logo and the slider is displayed below it.
    How do I get to display the logo and slide in the same line (logo on left and sloder on right)?

    This is the perfect code but I would like to add a small space between my navigation and the slider. Right now the slider is showing directly underneath the navigation buttons. Can’t find any info anywhere else! Please help

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using Snipit "Add content above featured pages" to display a metaslider.’ is closed to new replies.