Home › Forums › Support › add rel="nofollow" to featured image link This topic has 4 replies, 2 voices, and was last updated 4 years, 11 months ago by Leo. Viewing 5 posts - 1 through 5 (of 5 total) Author Posts May 27, 2019 at 1:25 pm #912553 Colin Hi, I need to add rel=”nofollow” to the feature image href specified within generate_after_entry_header, generate_featured_image_output. I see the code within /inc/structure/featured-images.php however I’d prefer not to hack it. Could you help? Thank you, May 27, 2019 at 1:26 pm #912554 Colin Actually, on 2nd thought I’d like to remove the link all together. Just have it display the image. Thank you, May 27, 2019 at 1:32 pm #912556 LeoStaff Customer Support Hi there, Try this PHP snippet: add_filter( 'generate_featured_image_output', function( $output ) { return sprintf( // WPCS: XSS ok. '<div class="post-image"> %2$s </div>', esc_url( get_permalink() ), get_the_post_thumbnail( get_the_ID(), apply_filters( 'generate_page_header_default_size', 'full' ), array( 'itemprop' => 'image', ) ) ); } ); Adding PHP: https://docs.generatepress.com/article/adding-php/ Let me know ๐ May 27, 2019 at 1:40 pm #912558 Colin Perfect, thanks! May 27, 2019 at 1:50 pm #912562 LeoStaff Customer Support No problem ๐ Author Posts Viewing 5 posts - 1 through 5 (of 5 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In