ThemeShaper Forums » Thematic

[closed]

filtering html of certain featured images

(1 post)
  • Started 12 years ago by kwight
  • This topic is not resolved
  1. kwight
    Member

    Hello,

    With the help of this post (http://forums.themeshaper.com/topic/thumbnail-link-graphic) I've got a function that adds a permalink link to featured image thumbnails:

    function featured_image_link( $html, $post_id ) {
        if (!is_single()) {
    	    $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';
        }
        return $html;
    }
    
    add_filter( 'post_thumbnail_html', 'featured_image_link', 10, 3 );

    This works. However, I'm also using the Meteor Slideshow plugin that uses featured images for its slides, and the above function filters the target links of the Meteor slides, breaking them.

    Is there a method in Thematic (or WordPress in general) that would allow me to filter just the post thumbnails, rather than the Meteor slides?

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.