• Resolved sumcan

    (@sumcan)


    Hi,
    The Continue Reading button seems to jump to the top of the post using the permalink.
    Is there any way I can change it to jump to where the more tag is used in the post?
    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Clarion Technologies

    (@clarionwpdeveloper)

    Hello sumcan,

    Please share your website link to check.

    Thanks

    Thread Starter sumcan

    (@sumcan)

    Hi,
    My website is http://ccgi.peony.plus.com/
    Thanks!

    Fotis

    (@markwaregr)

    You can add this inside your functions.php file

    function more_jump_link($link) {
    	global $post; 
    
    	 if ($pos=strpos($post->post_content, '<!--more-->') && in_the_loop()){
    		$offset ='#more-'.$post->ID;
    	}else{
    		$offset='';
    	}
    
    	return $link.$offset;
    
    }
    add_filter('post_link', 'more_jump_link');

    Thread Starter sumcan

    (@sumcan)

    It worked!
    Thank you very much!! 🙂

    Fotis

    (@markwaregr)

    You are welcome!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Continue Reading using the permalink’ is closed to new replies.