Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1013091

    Hi,

    I’d like to add a revolution slider to some of my pages, before the title/breadcrumb section. How can I do that?

    Thanks

    • This topic was modified 6 years, 1 month ago by SilviaNT.
    #1013340

    Hi,

    Is it possible to add short code in the header.php for this purpose?

    #1013408

    Hi SilviaNT,

    Yes, it’s possible to use a shortcode for that.
    You can use this hook ava_after_main_title to insert the shortcode after the title/breadcrumb section.
    Hope this helps.

    Best regards,
    Nikko

    #1013434

    Hi Nikko,

    Is the hook ava_after_main_title already in the header.php or do I add this hook? If so, where should it be added?

    Thanks

    #1013567

    Hi SilviaNT,

    The hook is located just below the header, just after the title & breadcrumbs section.
    You should see it in files like page.php, single.php, etc.
    You just need to hook it and add the php code at the bottom of functions.php, an example of the code you use is:

    function my_slider() {
        echo do_shortcode("[myshortcode]");
    }
    
    add_action('ava_after_main_title', 'my_slider');

    Just replace [myshortcode] with the shortcode you will use.
    Hope it helps.

    Best regards,
    Nikko

    #1013953

    Hi Nikko,

    I’ve added the code to the bottom of functions.php, however I can’t see the slider on my page. I’ve attached the screenshot of the code.

    #1013955

    I added the slider shortcode in the header.php file, under the <div id=’main’ line. The slider seems to be working now.

    #1014003

    Hi,

    Great, glad you got it working. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.