Support » Theme: CosmosWP » Link Featured Images to Post

  • Resolved mypcbasics

    (@mypcbasics)


    Is there an option to add a link from the featured image to the post?

    I want to add an option to click on the post image not only on the post title…

    I tried this, but it’s not working…

    function autolink_featured_images( $html, $post_id, $post_image_id ) {
    $html = ‘‘ . $html . ‘‘;
    return $html;
    }
    add_filter( ‘post_thumbnail_html’, ‘autolink_featured_images’, 10, 3 );

    • This topic was modified 3 months, 1 week ago by mypcbasics.
    • This topic was modified 3 months, 1 week ago by mypcbasics.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.