Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add a permalink to an image in custom excerpt?

Discussion in 'Themes and Templates' started by mattc_uk, Jan 23, 2016.

  1. mattc_uk

    New Member

    Jan 23, 2016
    Likes Received:
    I have a website which has embedded videos in it's posts. However, I am using screenshot images of these videos in my excerpts (hence Using the custom excerpt meta box). How do I wrap <a href> .. </a> around the image so it links to the permalink? Given that I cannot use php in the custom excerpt meta box?

    If it were possible, the code in the excerpt box would be something like :
    <a href="<?php the_permalink(); ?>"><img src="my-image-url.jpg"></a>

    Is there a work around for this?

    Many thanks for any help

Share This Page

Monarch Social Sharing Plugin