• I’m using this code on my WP site:

    <?php
    query_posts('showposts=3');
    while(have_posts()) : the_post();
    ?>
    <ul>
    <li><h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?> &raquo;</a></h3></li>
    <li class="home_date"><abbr class="published" title="<?php the_time(__('j.n.Y', 'example')); ?>"><?php the_time(__('j.n.Y', 'example')); ?></abbr></li>
    <li><?php the_excerpt(); ?></li>
    </ul>
    <hr />
    <?php endwhile; ?>

    It shows latest post from the blog with excerpt. It works fine, but links doesn’t work in excerpts. They are like normal text..

    Links work fine on posts and blog..

    How do I fix that?

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you want your links to work as links, you’ll need to use the_content() rather than the_excerpt().

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    If you put a link in your custom excerpt field (instead of the auto generated one), it won’t strip the HTML.

    Good point but you’d need to paste all of the content you want to appear as a ‘teaser’ into the Optional Excerpt box – otherwise you’ll just end up with a single link.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    There’s an SEO benefit to custom crafted excerpts when used that way ?? I always custom craft on one of my sites (where I really care about SEO) and never let it just be the intro paragraph of my post. My other site I’m meh about.

    I couldn’t agree more! I’ve always thought that the best SEO comes out of taking the time to really craft your content but, IME, very few people seem to want to make the extra effort.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Links in excerpts. Not working..’ is closed to new replies.