Support » Fixing WordPress » Validation problem I think related to permalink code

  • Resolved mondolizzie


    When I try to validate my blog I get 81 errors. They mostly seem to be related to the code used to write the Permalinks. I cannot for the life of me figure out how to fix this. I tried downloading other widget ready themes and comparing code, but every theme writes it slightly differently, so I can’t figure it out doing this.

    Would some helpful person point me or direct me on how to specifically fix this problem?

    Here is my address:

    Thank you in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Nothing to do with permalinks… Example:

    <a href=""title="Permanent link toPermalink</a>

    is malformed ;’) This might work:

    <a href=""title="Permanent link to">Permalink</a>

    Rest of them are pretty much the same thing. Breathe deep, take them one at a time. If you start getting really frustrated move on to the next one.

    Is this found in the index.php? For instance, I have this in the index for the theme:

    <?php get_header(); ?>

    <div id="content">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2 class="posttitle"><a href="<?php the_permalink() ?>" title="<?php _e('Permanent link to'); ?><?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p class="commentmeta">
    <?php the_time('F jS, Y') ?> at <?php the_time() ?>
    (<?php the_category(', ') ?>)
    <?php edit_post_link(__('Edit'),' · ',''); ?>
    <?php if (is_search()) { ?>
    <?php the_excerpt(); ?>
    <?php } else { ?>
    <?php the_content(__('Read the rest of this entry &raquo;')); ?>
    <?php } ?>
    <p class="postfeedback">
    <a href="<?php the_permalink() ?>" title="<?php _e('Permanent link to'); ?><?php _e('Permalink'); ?></a>
    <?php comments_popup_link(__('Comments'), __('1 Comment'), __('% Comments')); ?>

    <?php endwhile; ?>

    <?php posts_nav_link('', __(''), __('&laquo; Previous entries')); ?>
    <?php posts_nav_link(' · ', __(''), __('')); ?>
    <?php posts_nav_link('', __('Next entries &raquo;'), __('')); ?>

    <?php else : ?>

    <h2 class="pagetitle"><?php _e('Search Results'); ?></h2>
    <p><?php _e('Sorry, but no posts matched your criteria.'); ?></p>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    <?php endif; ?>


    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Is this an error that can be fixed with one fell swoop by changing something here? Thanks in advance. And thanks for replying.

    This looks baaaad:
    <a href="<?php the_permalink() ?>" title="<?php _e('Permanent link to'); ?><?php _e('Permalink'); ?></a>

    Shouldn’t it be:
    <a href="<?php the_permalink() ?>" title="<?php _e('Permanent link to'); ?><?php the_title(); ?>"><?php the_title(); ?></a>


    Cool. Fixed that and it reduced the errors in validation down to 47. The hardest part of fixing this is to find the correct file that contains the error. Am I right that this is the time consuming part of fixing things?

    At first, absolutely… If you’re not already, tick the Show Source box at the validator page, and scroll down to see what’s by the line number in question. That really helped me.

    Do you also know anything about Amazon code? I have this in a text widget. The item appears properly in the sidebar but has xhtml errors:

    <div class="textwidget"><p><iframe src="" marginwidth="0" marginheight="0" width="120" height="240" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></p>

    The validations is all about the amperstands. However, I tried to locate others with this issue to see how they fixed it and couldn’t. Any ideas?

    So proud, fixed this myself by replacing all & with &amp;


    See? You rock!

    This issue with Amazon search ads still exists, so I’m glad this member posted the answer!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Validation problem I think related to permalink code’ is closed to new replies.