• Your themes are good. But you should add a condition when choosing following option

    Link Post Thumbnail to Post

    Don’t you think this should be only apply when displaying a post? It applies to the custom post types also which is not a good way. I checked your theme files and find this

    if ($nirvanas['nirvana_fpost']=='Enable' && $nirvanas['nirvana_fpostlink']) {
    	add_filter( 'post_thumbnail_html', 'nirvana_thumbnail_link', 10, 2 );
    }
    
    /**
     * The thumbnail gets a link to the post's page
     */
    function nirvana_thumbnail_link( $html, $post_id ) {
         $html = '<a href="' . esc_url( get_permalink( $post_id ) ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';
         return $html;
    }; // nirvana_thumbnail_link()

    You should atleast put a condition there to apply anchor tags only to posts. Thus it will not be applied to other post types and will not break other plugins or design.

    Regards

  • The topic ‘Featured Images anchor tag conflict with cpt’ is closed to new replies.