• Hey there wordpress gurus out there – need your help!

    I’m creating my blog and trying to make it completely w3c compliant. I’m ALMOST there, but my last problem is the <–more–> tag in my posts.

    The HTML I have in my blog page looks like this:

    <?php global $more;
    $more = 0;
    the_content('<br /><br /><b>Read the rest of this entry &raquo;</b>'); ?><br />

    And when I post my articles, the source code looks like this:

    …  <a href="..." class="more-link"></p>
    <p><b>Read the rest of this entry &raquo;</b></a></p>
    <br />

    And so it’s not validating.

    …Any thoughts about how to chnage the code to get it to validate or any plugins to install that could fix this?

    In case you want to see the source code yourself, the web-address https://www.origoldstein.com/blog/

    Thanks gurus!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Your validation errors are for missing tags; you need to fix your php so that the html end tag for the link – </a> – is rendered.

    And the unencoded ampersand errors are in your addthis links and are easy to fix: change to & amp ; (take the spaces out between the & and the ; )

    Why are you adding in 2 line breaks? By default the “Read more” link is placed within a paragraph tag and there’s a class on the link itself that you can style via CSS if you need more spacing.

    Try just using:

    the_content('Read the rest of this entry &raquo;'); ?>

    Then, in your stylesheet, add:

    .post_content .more-link {font-weight:bold;}

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘<–more–> tag creates a w3c validation error’ is closed to new replies.