Please note: This is an old post. The information is probably not accurate and up-to-date anymore.
Som standard, når du klikker på “Læs mere” link efter et indlæg, vil WordPress automatisk hoppe ned til det sted hvor <--more-->
er placeret. Det kan nogle gange være ret træls, så her et en kort tip til at fjerne hoppet. Bare sæt den ind i dit temas functions.php
function jayj_remove_more_jump_link( $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', 'jayj_remove_more_jump_link' );
Credits: Codexet; Link Jumps to More or Top of Page
Update:
Hvis du ikke gider til at rode rundt i koden, kan du bruge pluginet More To The Top
Tak til Rosenstrand
Hej
Nemlig – det er træls med det hop. Og en god løsning du kommer med her, men er man lidt kode-spasser (som jeg kan være nogle gange), er der et plugin, der gør nøjagtigt det samme: http://www.viper007bond.com/wordpress-plugins/other-plugins/more-to-the-top/
Hej,
Har opdateret indlægget med et link til pluginet. God idé!
I have just found the fix. I disable and then enable the read more plugin and now it works.
Glad you made it work (: