WordPress.org

Support

Support » How-To and Troubleshooting » making <! –more– > link to top of post page

making <! –more– > link to top of post page

  • i am wondering if there is a way to use <! –more– > in a manner such that when you click the (more) from the home page it goes to the top of the post page, not down to the part where the <! –more– > is inserted.
    Would this be possible using <! –more– > or some other way?

Viewing 8 replies - 1 through 8 (of 8 total)
  • @anon,
    You want your visitors to re-read the start of the post all over again?

    yes the key will be making them all shorter on the front page – so not much will be displayed for them to have to view again anyways .. also, they would be better oriented on where they had left off… finally, adsense is near the top =)

    Yeah, I find it annoying when the page jumps down too. I am quite capable of finding where I left off without my browser interfering. At any rate it would be nice to have the option.

    In function get_the_content() in wp-includes/template-functions-post.php, on line 129, or close to it find the line
    $output .= '$more_link_text";
    and change that to
    $output .= '$more_link_text";
    That should fix it the way you want it.

    Yeah, I just made this change myself. It’s most useful for people who have ‘list view’ pages that then link to full posts, and want the page to layout normally (and not jump partway down — you lose the site header, article title, etc…).
    I also just completely revised the excerpt system to match the content processing better, AND to put a (more) link at the end of the excerpt if a (more) sample string is passed into the function. Much better now! 😉
    -d
    http://www.chait.net

    You can click on the article header to get the full article text without skipping down to the more section.

    Yes, but that depends on the user knowing what they’re doing. Most people, when they see a ‘more…’ link, are going to click on that rather than the permalink. So 2Fargon’s solution is better.

    So I have to use a hack to do this? 🙁

    It seems to be slightly different for WP2.0.3….

    Change line 92 of template-functions-post.php to:

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

    (I think… use with caution!)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘making <! –more– > link to top of post page’ is closed to new replies.
Skip to toolbar