How to Remove Featured Image Link on Archive Page?

How to Remove Featured Image Link on Archive Page?

A Featured Image on the Archive pages has a link to the image, if you need to remove the link you will need to just use the following filters –

// Filter to remove featured image link on Archive Page

add_filter( 'astra_blog_post_featured_image_link_before', '__return_empty_string' );
add_filter( 'astra_blog_post_featured_image_link_after', '__return_empty_string' );

Note: Add the above filter to your child theme』s functions.php, here』s an article to help you Add Custom code.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注