• Resolved Alexandre BOURLIER

    (@alexandre-bourlier)


    Hi,

    Could you tell me which function do I need to call to manually insert a given Carousel within my header. Ideally, the options would be included also.

    Here is how my snippet looks like to insert it within a page:
    [owl-carousel category="Accueil" singleItem="true" autoPlay="4000" addClassActive="true" autoHeight="true" lazyLoad="true"]

    https://www.ads-software.com/plugins/owl-carousel/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Alexandre BOURLIER

    (@alexandre-bourlier)

    I tried:

    <br />
    echo owl_function([<br />
    'category' => 'Accueil',<br />
    'singleItem' => true,<br />
    'autoPlay' => 4000,<br />
    'addClassActive' => true,<br />
    'autoHeight'=> true,<br />
    'lazyLoad' => true ]);<br />

    It outputs all HTML, including images. So the function is called correctly and the category parameter works fine.
    However Javascript does not comes into play, so I end up with a bear HTML output, and that is it.

    I call the owl_function() function within my header.php file.
    Any idea of what I am missing?

    Plugin Author pjehan

    (@pjehan)

    Hi,

    You can use the WordPress do_shortcode function in your theme header.php file.

    This snippet works well for me:
    <?php echo do_shortcode('[owl-carousel category="Promotions" singleItem="true" autoPlay="false" navigation="true" ]'); ?>

    Thank you for the feedback and let me know if you experience any other problems with the plugin ??

    Thread Starter Alexandre BOURLIER

    (@alexandre-bourlier)

    Excellent! I wasn’t aware of this one.
    Works like a charm.

    Thanks!

    By far, one of the most time saving code ever..
    Thank you Alex !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Insert Owl Carousel within my header’ is closed to new replies.