0

I cannot change the url of the photo in the featured-image edit section. The page can be found at https://irregularus.com/tips-and-stories/ and if you click on the picture you will see that it just opens the picture.

1
  • You will need to override the post template (template-tags.php in your case) in child theme or you can use wp_get_attachment_image_src filter to override the url
    – Aparna_29
    Commented Feb 19, 2019 at 9:42

1 Answer 1

1

Use

<?php the_permalink(); ?>

to get the link to the current post. Essentially replace whatever the href property of the image link is right now so it looks similar to :

<a class="post-thumbnail" href="<?php the_permalink(); ?>" >
2
  • I apologize. I'm new with this and dont quite know what that means. where do I use <?php the_permalink(); ?> and how? Commented Feb 19, 2019 at 22:04
  • You will need to edit your theme in order to apply this change - essentially editing a php file. This will be quite tricky if you've never worked with html/php/css. Commented Feb 20, 2019 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.