• Resolved jasonemock

    (@jasonemock)


    Given a post that contains links to uploaded files (though links to external websites seems to also suffer this problem), the links are written-out as <a> tags in the HTML when viewing that post’s page, but are not linked when viewing the post on the homepage. For example, this blog post page renders the links as links properly, but when this post is viewed from the blog homepage, they are rendered as plain text. Other posts on the homepage don’t seem to have this problem. I’m not sure how the author created these posts to know if they were created differently, but even when I attempt to manually recreate the faulty post I get the same issue. Any suggestions on what I might be doing wrong are greatly appreciated. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jasonemock

    (@jasonemock)

    Okay, so I’ve narrowed the issue down (I believe) to the behavior of the_excerpt(). I’m interpreting this code:

    <? if (is_home() && (!$paged || $paged == 1) || is_search() || is_single() || is_page()): ?>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <? else: ?><?php the_excerpt() ?><? endif; ?>

    to mean that those pages found via the “previous entries” link on the homepage render an excerpt of the post, rather than the full post. The excerpt appears to strip links. I’ll look more elsewhere to confirm this (but welcome your input if you can confirm this for me) and will mark this as resolved for now. Thanks!

    You are correct. You can read more about it here: http://codex.wordpress.org/Template_Tags/the_excerpt

    You might find the_excerpt reloaded plugin interesting?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Links in post aren’t linked on homepage but are linked within post page’ is closed to new replies.