Title: Suggession: remove
Last modified: December 16, 2021

---

# Suggession: remove

 *  [cslegany](https://wordpress.org/support/users/cslegany/)
 * (@cslegany)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/suggession-remove/)
 * YARPP generates links without visible images if the main post image is hidden.
 * It is caused by the fact, that the main post image uses the same css class (“
   wp-post-image”) as the image thumbnails in get_the_post_thumbnail() used by YARPP.
   So I suggest changing template_thumbnails.php as follows to remove any classes
   assigned to the  generated by get_the_post_thumbnail().
 * $post_thumbnail_html = get_the_post_thumbnail( null, $dimensions[‘size’], array(‘
   data-pin-nopin’ => ‘true’ ) );
    $post_thumbnail_html = preg_replace( ‘/(class)
   =”[^”]*”/’, ”, $post_thumbnail_html );

The topic ‘Suggession: remove’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [cslegany](https://wordpress.org/support/users/cslegany/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/suggession-remove/)
 * Status: not resolved