Customising the More tag
I’ve always found the “Read More” function at the botton of each WordPress post on the home page very useful. It enables the reader to “scan” the first few lines of the article and then make the decision to read the rest of it or not.
However, by default, when you click on the Read More link, the web page loads and then “jumps” to where the <–more–> tag is set in the post. If you do not want that “jump”, you can change the default function of how this works.
If you are comfortable tweaking a few lines of code, you just change a couple of lines in the wp-includes/template-functions-post.php file.
(NOTE: In WP 2.1 and later, the code is found in wp-includes/post-template.php ).
(NOTE: When you upgrade WordPress, this file will be replaced so make a note of the change so you can change it again after upgrading.):
Change this:
$output .= ‘ $more_link_text”;
to
$output .= ‘ $more_link_text”;
or
$output .= ‘ $more_link_text’;
Job done!
Subscribe to the Blogging Crew feed


