Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #446302

    Hi
    I’m sorry to ask a question that has been asked in the forum, but I find no answer

    As the title says, I’m trying to include a layerSlider in the header
    To do so,
    I’ve installed the layerSlider WP plugin and create a new slider (ID 5)
    I’ve copied the helper-main-menu.php in my child theme (in includes/helper-main-menu.php)

    I’ve add below this code
    /* * Hook that can be used for plugins and theme extension/* (line 149)
    These line
    <div id="sliderheader"><?php echo do_shortcode("[av_layerslider id='5']"); ?> </div>
    But it display an empty and blank space (as the slider #5 exists)

    <div id="sliderheader"><?php echo do_shortcode("[layerslider id='5']"); ?> </div>
    But it display the shorcode in itself as e text (i.e [layerslider id=’5′] , and nothing esle

    header

    What should I do to display the slider ?

    Many thanks

    #447248

    Hey Ikyo!

    I don’t think you’ll be able to use do_shortcode with the LayerSlider.

    And the reason the shortcode is displaying is because you need to use [av_layerslider id='5'].

    Also, if you have the LayerSlider installed as a plugin then it would be best to deactivate that. We already include it in the theme files.

    Best regards,
    Elliott

    • This reply was modified 9 years, 7 months ago by Elliott.
    #447651

    Thanks for your Answer Elliott
    The only code you gave me doesn’t works in the header

    But whenever i’m adding the following code
    <div id="slideraccueil"><?php echo do_shortcode("[av_layerslider id='5']"); ?> </div>
    in includes/helper-main-menu.php
    AND
    `[av_layerslider id=’5′].’ in a page
    It’s working

    The problem is I want the slider in every header of every page of the site…and it will be meaningless if I add it manually in each part of my site

    What should I do ?
    Thanks for your precious help and your powerful support

    Thanks !

    • This reply was modified 9 years, 7 months ago by Ikyo.
    #448483

    Hi!

    Yeah I don’t think that’s going to work. It’s probably going to take a lot of layout changes. It would be best to hire a freelancer to help you out with this customization.

    Regards,
    Elliott

    #448487

    Thank you for your precious help Elliott
    I’ll follow your advice
    Have a nice week-end

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Insert layerslider in header php’ is closed to new replies.