• Resolved marv2

    (@marv2)


    Hi, I would like to add the meta slider shortcode to my post template permanently, and load the slider based on the number inputted into a meta field in my post editor called ‘gallery’.

    I can’t seem to figure out how to do this though. Can someone please point me in the right direction?

    Also, is the shortcode the only way to load the slider or is there also another piece of code I can use?

    Thanks!

Viewing 1 replies (of 1 total)
  • Hi,

    You will need to use the template code for the slider, and change the id to a variable. e.g.:
    echo do_shortcode("[metaslider id=".$ms_id."]");

Viewing 1 replies (of 1 total)
  • The topic ‘How to load a slider using a post meta field’ is closed to new replies.