WordPress.org

Forums

Meta Slider
[resolved] I'm not able to put meta slider on home page only (2 posts)

  1. djamalle
    Member
    Posted 1 year ago #

    Hi,

    Put the slider on the desired place, but it appears on all pages. I would like to put in on homepage only. The code in FAQ do not work for me, because I'm using thesis theme, and the structure of the theme is different, and I don't have header.php where I put custom code, it doesn't work on index.php file either.

    I installed smooth slider and used this code in custom_functions.php with great success: http://s13.postimg.org/nkenw3b13/Untitled.png

    But I can't figure out how to edit similar code for meta slider..

    Thanks in advance!

    https://wordpress.org/plugins/ml-slider/

  2. Matcha Labs
    Member
    Plugin Author

    Posted 1 year ago #

    Hi djmalle,

    Please try this:

    function add_metaslider() {
        if (is_front_page()) {
            echo do_shortcode("[metaslider id=XXXX]");
        }
    }
    add_action('thesis_hook_before_content', 'add_metaslider');

    Regards,
    Tom

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Meta Slider
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.