WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] Meteor Slides & Custom Fields (4 posts)

  1. phlppgrssr
    Member
    Posted 8 months ago #

    Hello,

    first of all: Thanks for this great Plugin!

    At the moment, I'm trying to integrate different slides to each Site/Post. For that, I'm using custom fields and the php-code of Meteor Slides. I use a custom field, where I enter the slug of the slider name:

    <?php if ( function_exists( 'meteor_slideshow') ) { meteor_slideshow( "<?php echo(get_post_meta($post->ID, 'slider-name', TRUE)) ?>", "" ); } ?>

    For any reason, it does not work. Does anyone know a solution for that?

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

  2. Josh Leuze
    Member
    Plugin Author

    Posted 8 months ago #

    You're welcome! You can't do PHP tags within PHP tags like that, just wrap the whole thing in tags.

    But I would also get the slideshow slug from the custom field and set it as a variable to be used by the slideshow function:

    <?php $meteor_slider_slug = get_post_meta( $post->ID, 'slider-name', TRUE );
    if ( function_exists( 'meteor_slideshow') ) { meteor_slideshow( $meteor_slider_slug, "" ); } ?>
  3. phlppgrssr
    Member
    Posted 8 months ago #

    Works perfectly! Thanks!

  4. Josh Leuze
    Member
    Plugin Author

    Posted 8 months ago #

    No problem!

Reply

You must log in to post.

About this Plugin

About this Topic