Viewing 1 replies (of 1 total)
  • You can use shortcodes inside a php file with

    echo do_shortcode('[metaslider id=1479]');

    So you could add to a functions.php file with something like this:

    add_action ('__after_header' , 'add_meta_slider_to_pages');
    function add_meta_slider_to_pages() {
    	if ( is_page(62) ) {
    		echo do_shortcode('[metaslider id=1479]');
    	}
    }

    In my case, the __after_header hook is in my theme. You’d need to find a suitable hook in your own theme, or use one of WordPress’s.

Viewing 1 replies (of 1 total)
  • The topic ‘Programming slides on the fly’ is closed to new replies.