Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] WordPress: <!–more–> html validation errors

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28304
    jamygolden
    Member

    I’m creating a wordpress theme.
    Every time I add <!–more–> in the back-end posts section of wordpress it creates something that says "Continue reading ".

    However there is always a <p></a></p> right below it. I can’t find what the problem is.

    Html

    Code:

    Continue reading »

    Posted in Uncategorized | Edit | Comment;

    Php

    Code:
    Continue reading »

    ‘); ?>

    ‘); ?> Posted in |

    Any help would be appreciated.

    #72113
    Rob MacKay
    Participant

    very weird…

    #92405
    mik3ca
    Member

    its normal. <p></a><p> is an error to HTML validation because of the </a>. you’re basically asking any HTML processor to process an ending part of a hyperlink to an unknown location inside a paragraph of nothing.
    There are two easy ways to fix this. either remove </a> or change it to ‘<a href=”url”>label</a>’ but replace url with an actual url to a webpage and label will be the text that will appear as a hyperlink.

    #100224
    Patrick
    Member

    By default WP output is:


    Continue reading »


    We can see the first < p > tag don’t have the end tag.

    If your theme have the loop.php file take a look on this code:

    '.__('Continue reading »').'

    ');

    and changes it to:

    and it will output this:

    Continue reading »

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.