The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] How can I get page to load at the very top, rather then show content below 'more (4 posts)

  1. Firstthingjoe
    Posted 3 years ago #

    When a visitor clicks on the continue reading (more) on my front page they are directed to the part of the page where the content of the article they have not read appears at the top.


    I would like the visitor to open the page at the very top so my header and ad's can show right away.

    How can I make this happen?

  2. Yup! Add this code to your custom functions:

    function my_more_jump_to_top($link) {
        $offset = strpos($link, '#more-');
        if ($offset) {
            $end = strpos($link, '"',$offset);
        if ($end) {
            $link = substr_replace($link, '', $offset, $end-$offset);
        return $link;
    add_filter('the_content_more_link', 'my_more_jump_to_top');
  3. Firstthingjoe
    Posted 3 years ago #

    Thanks Josh! That did the trick.

  4. My pleasure :)

Topic Closed

This topic has been closed to new replies.

About this Topic