Support » Plugin: Meteor Slides » [Plugin: Meteor Slides] Using my custom meta to choose which slideshow to display

  • Hi
    In my theme I have a slideshow at the top of the page that shows the default-slideshow.
    I also have other slideshows and would like to be able to choose which slideshow is displayed on any given page by using custom meta boxes in the editor.
    I have added the custom meta (text field) to the page editor and would like to return this custom meta into the template in order to select which slideshow will display.

    EG. I have: SLIDESHOW1 and SLIDESHOW2 (created using Meteor Slides) and would like to type either of these names into the custom meta box so that slideshow is displayed.

    I would normally use the following to display the text that was entered into the custom meta box:
    <?php echo get_post_meta(get_the_ID(), "example_meta_ID", true); ?>
    But I am struggling to work out how to combine this with the Meteor Slides template code that calls for the slideshow:
    if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow( "default-slideshow", "random: 1, pause: 0" ); }

    Any help would be massively appreciated!
    Cheers

    http://wordpress.org/extend/plugins/meteor-slides/

Viewing 1 replies (of 1 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Hi Martin, try using this:

    <?php if ( get_post_meta( $post->ID, "slideshow_value", $single = true ) != "" ) {
    
    	$custom_slideshow = get_post_meta( $post->ID, "slideshow_value", $single = true );
    
    	if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow( $custom_slideshow, "random: 1, pause: 0" ); }
    
    } ?>
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Meteor Slides] Using my custom meta to choose which slideshow to display’ is closed to new replies.