WordPress.org

Ready to get started?Download WordPress

Forums

making <! --more-- > link to top of post page (9 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    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?

  2. NuclearMoose
    Member
    Posted 10 years ago #

    @anon,
    You want your visitors to re-read the start of the post all over again?

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    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 =)

  4. WillM
    Member
    Posted 10 years ago #

    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.

  5. carthik
    Member
    Posted 10 years ago #

    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.

  6. davidchait
    Member
    Posted 10 years ago #

    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

  7. Anonymous
    Unregistered
    Posted 10 years ago #

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

  8. WillM
    Member
    Posted 10 years ago #

    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.

  9. 3stripe
    Member
    Posted 8 years ago #

    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!)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.