Web Hosting
  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

    Joined:
    Jan 23, 2016
    Messages:
    1
    Likes Received:
    0
    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
     
    #1

Share This Page

Web Hosting