Title: thumbnail without link
Last modified: August 21, 2016

---

# thumbnail without link

 *  [BMag](https://wordpress.org/support/users/bmag/)
 * (@bmag)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnail-without-link/)
 * hello. Thank you for an amazing plugin. It works great and runs so cleanly.
 * I’d like to unlink the thumbnail output from it’s respective post.
 * I implemented the solution you provided for another forum question ([http://wordpress.org/support/topic/plugin-display-posts-shortcode-title-of-post-without-link?replies=3](http://wordpress.org/support/topic/plugin-display-posts-shortcode-title-of-post-without-link?replies=3))
   on how to unlink the title output and that works great, thank you.
 * I’d also like to unlink the thumbnail. How would I go about that please sir?
 * [http://wordpress.org/extend/plugins/display-posts-shortcode/](http://wordpress.org/extend/plugins/display-posts-shortcode/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [BMag](https://wordpress.org/support/users/bmag/)
 * (@bmag)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnail-without-link/#post-3702099)
 * I tried to add this code to solve the image link but it added back the link to
   the title
 *     ```
       /**
        * Adding additional fields to Display Posts Shortcode
        * This adds the field 'linkedimage', and if false the image isn't linked
        * @author Bill Erickson
        * @link http://wordpress.org/extend/plugins/display-posts-shortcode/
        *
        * @param string $output the original markup for an individual post
        * @param array $atts all the attributes passed to the shortcode
        * @param string $image the image part of the output
        * @param string $title the title part of the output
        * @param string $date the date part of the output
        * @param string $excerpt the excerpt part of the output
        * @param string $inner_wrapper what html element to wrap each post in (default is li)
        * @return string $output the modified markup for an individual post
        */
   
       add_filter( 'display_posts_shortcode_output', 'be_display_posts_linked_image', 10, 7 );
       function be_display_posts_linked_image( $output, $atts, $image, $title, $date, $excerpt, $inner_wrapper ) {
   
       	// First check if there's a image and if 'linkedimage' equals 'false'
       	if ( !empty( $image ) && 'false' == $atts['linkedimage'] )
       		// Now let's rebuild the image
       		$image = '<span class="image">'. get_the_image() .'</span>';
   
       	// Now let's rebuild the output.
       	$output = '<' . $inner_wrapper . ' class="listing-item">' . $image . $title . $date . $excerpt . '</' . $inner_wrapper . '>';
   
       	// Finally we'll return the modified output
       	return $output;
       }
       ```
   
 * Any recommendations?

Viewing 1 replies (of 1 total)

The topic ‘thumbnail without link’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [BMag](https://wordpress.org/support/users/bmag/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/thumbnail-without-link/#post-3702099)
 * Status: not resolved