More Link Modifier
Quick summary: A simple plugin that gives you more control over the default "more" link generated by the <!--more--> tag.
Download: More Link Modifier (~180kb)
Latest version: 1.0.2
Tested on: v2.2, v2.7, v2.8
Description:
The default link that you get from using the <!--more--> tag is Continue reading 'title here' and has an anchor link that jumps to the part of the post that corresponds to where the <!--more--> tag was placed. I didn't like this (especially the anchor link) so went into the source code and hacked it - then thought, hey why not just write a plugin to do it? So here we are - my first plugin!
After activating the plugin, you should be able to find the "More Link" tab under "Options" in the admin page. This plugin will let you change the text that is displayed. You can either just show plaintext, or also include the post's title in the link by using [TITLE]. If you choose to include the title in the link you have a couple more options:
- Leave the title as is
- Limit the title to x characters
- Limit the title to x words (maximum of 99 words)
- Add ellipsis (...) to the end of the title if it has been cut off (used with 2 and 3)
For the link text you can use some basic HTML (bold, italic, underline) and also special characters. The last option is you can choose to remove the anchor link, so when the link is clicked it will show the beginning of the post and not the middle.
Examples:
Let's use two random post titles as examples:
- answer to life the universe and everything
- forty two
Custom Link Text: » To read or not to read...
- » To read or not to read...
- » To read or not to read...
Custom Link Text: Continue reading <i>"[TITLE]"</i>
(options chosen: max of 3 words, including ellipsis)
- Continue reading "answer to life..."
- Continue reading "forty two"
Custom Link Text: more of '[TITLE]' ⇒
(options chosen: max of 20 characters, not including ellipsis)
- more of 'answer to life the u' ⇒
- more of 'forty two' ⇒
If you have any ideas/suggestions for improvement or found any bugs please email me
Hope you like the plugin!
Changelog/Updates
15/08/2009 (v1.0.2): Is now available in Danish thanks to Georg Adamsen (http://wordpress.blogos.dk/)
September 12th, 2007
Looks very nice. I’ve been using “Less” on my site to get rid of the anchor link but I like that your plugin allows the link text to be changed.
September 12th, 2007
Whoops… Small bug… Try entering a special character in the “Custom Link Text” box. I used “»”, the same character that is used in the default link, and ended up with some odd results.
The first time you save it displays correctly on the site but the admin section shows “»”. The next time you save the site displays “»” and the admin section displays “Ã�»”.
September 12th, 2007
Hi Jason,
I’ll try and see if I can fix it up though!
Just wondering did you enter ‘»’ or did you enter ‘»’ ? At the moment it should work if you enter ‘»’ but I do believe it acts strangely when you just enter the character as you see it
Nice to know you like the plugin
September 13th, 2007
hi… I just tried it, but can’t get it to work. What version of Wordpress is needed?
I use Wordpress 2.0.x because my host doesn’t support PHP5 (bummer!).
September 14th, 2007
@pyko,
I had been entering the character itself. I just tried the entity now and it works fine. Thanks for the help.
September 15th, 2007
@Matt
I’ve only tried it on WordPress 2.2.1 and 2.2.2 so don’t know if the plugin will work on 2.0.x – sorry! I did have a quick look at the difference between PHP4 and PHP5 and it seems like I haven’t used anything that is PHP5 only…
When I find some spare time I’m going to get the older versions of WordPress and test out the plugin – then I’ll get back to you
@Jason
Nice to know it worked out! I did try to see if I could tweak it so you could enter the character as is, but didn’t quite work (and makes the code quite ugly). So unless I find a nicer solution, I’ll probably leave it as is, since the link will likely only have 1 or 2 special characters.
September 27th, 2007
i beleive that the plugin is realy cool, but why doesnt convert all posts on my blog and only on someones?
i have the following :
http://www.mydomain.com/hotels/design-hotels/americas-design-hotels/page/3/ the Condesa df is still on read more>> but all the others are realy work nice.
If you can give me a tip? please do!
October 3rd, 2007
Hi Lazaros,
I’ve had a look at your site, I believe you mean:
http://www.luxury-global-hotels.com/hotels/design-hotels/americas-design-hotels/page/3/
instead of the link you put above?
And the Condesa post seems to look fine to me, it has:
more about : Condesadf Hotel, Mexico Design Hip Hotel, Mexico Design Hotels
Maybe try refreshing your page – see if that works?
As for the compatibility issues…it works with WordPress 2.3, but still haven’t found time to check if it works with earlier versions of WordPress. I’ve downloaded a couple and will keep you guys updated once I’ve tested them
November 22nd, 2007
yes yes yes! Thankyou! I had been looking head over heels through loads of the WordPress files trying to remove that stupid anchor link jump! Good job man you saved me many hours of playing around no doubt!!
December 11th, 2007
Hello Pyko,
I’m using the Less plugin for years now. Yours also looks very good, but I was wondering if it could be made even better
…
Could the more-text be altered on a post to post basis?
Sometimes I have something behind the that requires ‘Read more’ text to be displayed. Sometimes though it would be better to display ‘Look her for more examples’ or ‘Do you want to know why?’ or ‘Click for a complete list’ etc. etc.
What would be great is a new field in the write section somewhere beneath the post/tag textarea which says ‘More text’. If left blank it should display the standard text you’ve give in the options screen, but in the ‘write post’ screen you could overwrite this with a custom text.
What do you think? Could this be done? Personally I think this would make a great plugin, but I’m not a programmer
…
December 16th, 2007
Aaah, I thought this would allow me to change the actual url to point, for instance, to another web site rather than the auto-permalink … is there an option for this?
December 17th, 2007
What I was suggesting is already possible… I just found out, after using WP for five years!!!
http://codex.wordpress.org/Customizing_the_Read_More
May 11th, 2008
hi. Thanks for plugin
perfect.
regards
July 4th, 2008
htmlentities() messes up UTF-8 text.
Using htmlspecialchars() instead helped.
September 2nd, 2008
Thanks for the plugin, this is what i am looking for so long time~ cheers
December 19th, 2008
This is a cool plugin but I noticed that it fails to work on some stories. I’m not sure why but I’m using 2.7 now and I think the syntax of the Read Me code has changed in post-template.php. Just wondering if you’ve checked compatibility with this version. Thanks!
March 5th, 2009
Hi, This is exactly what I have been looking for, but when I use it in my posts, my important and much needed right plugin column with news, login etc all dissapear to the bottom of the page.
Any ideas how to solve. Tried taking them from middle column to right, left etc
appreciate help, Colin
August 15th, 2009
As for the Danish translation, this reveals that the plugin is capable of being translated into almost any language!
September 10th, 2009
I have installed it but can’t find an options tab on admin page? Why?
I will have to deactivate it because it doesn’t work
September 10th, 2009
I have installed it but there is no options tab on my admin page, why?
I will have to deactivate it because IT DOES NOT WORK
September 10th, 2009
Hi Tim,
What verision of WordPress are you using? If you are using one of the newer versions you should be able to find the admin options under the “Settings” section. It is called “More link”.
Cheers,
pyko
September 25th, 2009
Hi,
Simple and beautifull plugin. Thanks!!
November 13th, 2009
Nice plugin, thank you. Is there any way to change the font size for the “more” link?
November 20th, 2009
Hi pyko, thank you for your good job – I wonder if is possible to add the rel=”nofollow” to the link. Could you give me a hint please? Chris