problem with custom url to the featured image

Rate this post

I have used a wordpress plugin (Add Featured Image Custom Link) to insert custom url to the featured image.

I have two functionalities in my portfolio:

  1. when the user click on image it will popup the image; this is working properly.
  2. the anchor tag I have used for the link which I have added to featured image I want to redirect to the website of which I have added the link on featured image

How do I do #2

<div class="option inner">
    <h5><?php the_title(); ?></h5>
      $url = get_the_post_thumbnail_url(get_the_ID(),'full');
    <a href="<?php echo $url; ?>" class="fa fa-search mfp-image"></a>
    <a href="" class="fa fa-link"></a>



I got my solution by one way i think it is not the proper way that is, inplace of <a href="" class="fa fa-link"></a> i wrote the funciton the_content and inside editor of the wordpress i use the custome html like this

<a href="" class="fa fa-link"></a>

Leave a Reply

Your email address will not be published.

Back to top button