danielb
Member
Posted 3 years ago #
Hello!
I'd want to achieve such layout in archive.php page:
<h2><a href=post_permalink>Post title</a></h2>
<p><a href=post_permalink>Post excerpt ... tincidunt litterarum diam feugiat in ipsum</a></p>
Is it possible at all? I've searched the forum and the web but haven't found any solution on how to display entire excerpt as a link.
Thanks in advance.
The excerpt already adds <p> tags i think, so why not just do...
<a href="yourlink"><?php the_excerpt(); ?></a>
danielb
Member
Posted 3 years ago #
Unfortunately, XHTML doesn't allow <p> inside <a>.
Then you'll need to re-write the excerpt filter via a function in your theme/ else edit a core file to change the tags generated.
Was aware it's not XHTML, but wasn't sure if that matters...
danielb
Member
Posted 3 years ago #
I did more thorough search and found this topic:
http://wordpress.org/support/topic/197815
It works right in the template and doesn't require any mods.
Thanks for your reply.