WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
Link title and or excerpt also (2 posts)

  1. fjavier
    Member
    Posted 2 years ago #

    Hi, I know it may have been asked before but the search returns tons of unrelated stuff.
    My question is if an hyperlink exists for any slide, how do I switch it or add it to link the title and~or excerpt also? by looking at the template I suppose is an addition or replacement of the parts involved? seems very simple task but I like to find out in case there are other parts involved also.
    Great plugin script and thanks in advance.

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

  2. Josh Leuze
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, thanks for trying my plugin!

    To make the title a link follow the same method that I'm using for the slide images:

    <?php // Adds slide image 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_post_thumbnail( 'featured-slide' ); ?></a>
    				<?php // Adds slide image without Slide URL link
    				else: ?>
    					<?php the_post_thumbnail( 'featured-slide' ); ?>
    				<?php endif; ?>

    So you'd add it twice, once with the link below the linked image, and once without the link below the non-linked images:

    <?php // Adds slide image 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_post_thumbnail( 'featured-slide' ); ?></a>
    					<p><a href="<?php echo get_post_meta( $post->ID, "slide_url_value", $single = true ); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
    				<?php // Adds slide image without Slide URL link
    				else: ?>
    					<?php the_post_thumbnail( 'featured-slide' ); ?>
    					<p><?php the_title(); ?></p>
    				<?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic