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:
- when the user click on image it will popup the image; this is working properly.
- 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"> <div> <h5><?php the_title(); ?></h5> <?php $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> </div> </div>
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="https://stackoverflow.com/" class="fa fa-link"></a>