WordPress.org

Ready to get started?Download WordPress

Forums

Using "More" Tag to Access Full Entry (5 posts)

  1. desi
    Member
    Posted 8 years ago #

    Hi,

    I like using the <!--more--> tag, because I don't want my full entry to appear on my index pages - but the "jump" to the extended entry, when the "continue reading" link is clicked drives me insane. :)

    Is there anyway that I can make the "continue reading" tag link to the whole post, and not just what comes after the "more" tag?

    Thanks!
    desi

  2. Unless there's already an existing way, I'll write a quick plugin to strip the anchor from the link.

  3. niziol
    Member
    Posted 8 years ago #

    I'm not sure if there is an easier way than this, but I changed line 89-92 in template-functions-post.php to:

    if ( $more )
    $output .= /*'<a id="more-'.$id.'"></a>'.*/$content[1];
    else
    $output .= ' <a href="'. get_permalink() . "">$more_link_text</a>";

    Just be sure you paste it over the existing code that is similar to above, in case the line numbers aren't exactly right - and of course, back it up! It removes the anchor on the link and removes the anchor point from the full content, so it starts at the top of the page, no jump!

    Good luck,
    Michael.

  4. desi
    Member
    Posted 8 years ago #

    Thanks Viper for the offer.

    Thanks niziol for the code...

    That was exactly what I was looking for...

    I just cut the

    #more-$id

    from that section and I'm good.

    Thanks everyone for the help and the speed!

    desi

  5. Just wrote the plugin so you don't have to modify any core files. :)

    http://www.viper007bond.com/wordpress-plugins/more-to-the-top/

Topic Closed

This topic has been closed to new replies.

About this Topic