Nuking Named Anchor with "More" Function (3 posts)

  1. TheGreatBundini
    Posted 9 years ago #


    Is it possible to get rid of the named anchor that comes up when you click on the "Read the rest of this entry" on an article? So instead of going to, say "http://domain.com/?p=1#more-1" it would just take you to "http://domain.com/?p=1"

    This would essentially make the link for "More" the same as just clicking on the entry's title.

    Hope that's clear. :)


  2. Kafkaesqui

    Posted 9 years ago #

    The only way to do this is to edit the source.

    In template-functions-post.php (wp-includes/ directory) locate the get_the_content() function and this line in it:

    $output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>";

    Edit out the #more-$id portion. Source editing note: back up any files before editing them, and comment your changes for future reference.

  3. dvs
    Posted 9 years ago #

    A plugin as discussed in this topic also works and may be preferable to editing the source.

Topic Closed

This topic has been closed to new replies.

About this Topic