WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] text as pager (8 posts)

  1. smeyer012
    Member
    Posted 2 years ago #

    I have followed the instructions on your site for changing the pager to the title, which is very useful. However now they don't act as links to navigate between the slides, they just indicate which slide you are on...not sure what to do to achieve that.
    Thanks!

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

  2. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Do it just like how the link is added to the slide image conditionally:

    <?php // Adds slide title with Slide URL link
    if ( get_post_meta( $post->ID, "slide_url_value", $single = true ) != "" ): ?>
    	<a href="<?php echo get_post_meta( $post->ID, "slide_url_value", $single = true ); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    <?php // Adds slide title without Slide URL link
    else: ?>
    	<?php the_title(); ?>
    <?php endif; ?>
  3. smeyer012
    Member
    Posted 2 years ago #

    unfortunately that code doesn't work. the conditions aren't being met in the if statement and so it just displays the title.
    to be clear, though, I don't want the title to link to the url that you assign to the slide, I want the title to act just like the pager dots...to toggle between slides. Currently it assigns the appropriate class so that I can style the title to reflect the current banner, but I can't change the slide using the title link.
    This is in my custom meteor-slideshow.php file:

    <div id="meteor-buttons<?php echo $slideshow; ?>" class="meteor-buttons">
    	<?php // Loop which loads the pager nav with slideshow titles
    	while ( $meteor_loop->have_posts() ) : $meteor_loop->the_post(); ?>
    		<a class="meteor-title meteor-title-<?php echo $meteor_count; ?>" href="#"><?php the_title(); ?></a>
    	<?php endwhile; ?>
    	<?php // Reset the slideshow loop
    	wp_reset_postdata(); ?>
    </div><!-- .meteor-buttons -->
  4. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry, I misread that, thought your were trying to add the text at a caption.

    Did you also create a custom slideshow.js file in your theme? Can you post a link to the site you're working on?

  5. subharghya
    Member
    Posted 2 years ago #

    @JLeuze : I faced exactly same problem as smeyer012 and found that instead of #meteor-buttons selector it should be .meteor-buttons selector in the code that has to be appended after width: $slidewidth, in custom slideshow.js file. So the correct :eq() call is

    pagerAnchorBuilder: function(idx, slide) {
    	return '.meteor-buttons a:eq(' + idx + ')';
    }

    @smeyer012 : I hope this will solve your problem.

  6. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for pointing that out subharghya, I tested that with a single slideshow, but with multiple slideshows the ID will be different, so the class should be used. I updated the documentation for that.

  7. smeyer012
    Member
    Posted 2 years ago #

    Awesome. Works now. Thanks.

  8. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    No problem!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic