Forums

[resolved] WordPress Invalid HTML (5 posts)

  1. Theros
    Member
    Posted 3 years ago #

    Hi all!

    I'm working on this site here and I can't figure out why WordPress is parsing the HTML in such a weird fashion. When you test it for validation you get misplaced <p> and <a> tags...

    How can I fix this?

    Thanks,
    Eric Huang

  2. Xamataca
    Member
    Posted 3 years ago #

    Probably has to do with the code inside the index.php theme you are using in that site. And it seems that your "read on" links are causing part of the mess.
    Look in your wp-content/themes/"yourtheme"/index.php for:
    <?php the_content(__('(Read On)')); ?>
    And you can read more here:
    http://codex.wordpress.org/Customizing_the_Read_More

  3. Theros
    Member
    Posted 3 years ago #

    Okay, I looked through that page...I still can't figure out what's causing it. I'm not understanding what I need to change... When I change that line, it always gives me a PHP error.

  4. Xamataca
    Member
    Posted 3 years ago #

    Basically your source code shows invalid nested tags:

    <p>
    <a href="http://according2us.com/eric/post-title-1/#more-13" class="more-link"></p>
    <p>Read On</a></p>

    and should be:

    <p><a href="">Read On</a></p>

    The problem is at your theme index.php, you got some extra <p> somewhere..

  5. Theros
    Member
    Posted 3 years ago #

    I resolved the problem. It's because of the <brs> i was using.

Topic Closed

This topic has been closed to new replies.

About this Topic