Repairing my 'read more' link. (2 posts)

  1. gulliver
    Posted 3 years ago #

    In coding my own theme, I've broken the behavior of the 'read more' link.

    I'm using:

    <?php the_content('<p class="continue-reading">CONTINUE READING »</p>'); ?>

    The output incorrectly positions the p tags inside the link:

    <a href="LINK"><p>CONTINUE READING »</p></a>

    But they should be outside:

    <p><a href="LINK"><p>CONTINUE READING »</a></p>

    I've read what I can but can't see the fix.

  2. gulliver
    Posted 3 years ago #


    It's happening because I disabled the wpautop filter because I use hard-coded html for posts/pages and didn't want it changed (notably, it adds extra p tags when on html-comments) by the default WP treatment.

    I still have no idea what the fix is.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.