WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Validation problem I think related to permalink code (10 posts)

  1. mondolizzie
    Member
    Posted 8 years ago #

    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: http://mondolizzie.com

    Thank you in advance.

  2. yosemite
    Member
    Posted 8 years ago #

    Nothing to do with permalinks... Example:

    <a href="http://lizzieandrewborden.com/MondoLizzie/2006/07/12/northwest-by-northwest/"title="Permanent link toPermalink</a>

    is malformed ;') This might work:

    <a href="http://lizzieandrewborden.com/MondoLizzie/2006/07/12/northwest-by-northwest/"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.

  3. mondolizzie
    Member
    Posted 8 years ago #

    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'),' · ',''); ?>
    </p>
    <?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')); ?>
    </p>
    </div>

    <?php endwhile; ?>

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

    <?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; ?>

    </div>

    <?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.

  4. yosemite
    Member
    Posted 8 years ago #

    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>

    ??

  5. mondolizzie
    Member
    Posted 8 years ago #

    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?

  6. yosemite
    Member
    Posted 8 years ago #

    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.

  7. mondolizzie
    Member
    Posted 8 years ago #

    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="http://rcm.amazon.com/e/cm?t=lizzieandrewb-20&o=1&p=8&l=st1&mode=books&search=%22lizzie%20Borden%22%2C%20%22fall%20river%22&=1&fc1=&lt1=&lc1=&bg1=&f=ifr" 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?

  8. mondolizzie
    Member
    Posted 8 years ago #

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

    Thanks!

  9. yosemite
    Member
    Posted 8 years ago #

    See? You rock!

  10. grubgirl
    Member
    Posted 7 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic