• frederfred

    (@frederfred)


    Hi all!

    I’m wondering if it’s possible to link the whole the_excerpt(); to the_permalink();.

    Ofcourse the easiest way would be to wrap an a-tag around the excerpt but since that doesn’t validate, its out of the question.

    So, how can I filter the excerpt and have it echoed with an surrounding a-tag?

Viewing 1 replies (of 1 total)
  • You could use get_the_excerpt to intercept the output of get_excerpt before it is outputted, do what you need with it to get it to validate (strip out tags and the like) and then wrap it in a link tag using the_permalink.

Viewing 1 replies (of 1 total)
  • The topic ‘Make the whole excerpt linked to the_permalink’ is closed to new replies.