psychopyko welcome to psychopyko.com

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.3
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:

  1. Leave the title as is
  2. Limit the title to x characters
  3. Limit the title to x words (maximum of 99 words)
  4. 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: &raquo; 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]' &rArr;
(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 spacer Hope you like the plugin!

Changelog/Updates

  • 12/06/2011 (v1.0.3): Added option for more link to open in new window/tab. Also allowed img tags so you can include images in your more link.
  • 15/08/2009 (v1.0.2): Is now available in Danish thanks to Georg Adamsen (wordpress.blogos.dk/)
Comments (31) Trackbacks (7) ( subscribe to comments on this post )
  1. spacer
    Jason Litka
    September 12th, 2007 - 04:34

    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.

    ( REPLY )
  2. spacer
    Jason Litka
    September 12th, 2007 - 04:43

    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 “Ã�»”.

    ( REPLY )
  3. spacer
    pyko
    September 12th, 2007 - 09:26

    Hi Jason,
    Just wondering did you enter ‘&raquo;’ or did you enter ‘»’ ? At the moment it should work if you enter ‘&raquo;’ but I do believe it acts strangely when you just enter the character as you see it spacer I’ll try and see if I can fix it up though!

    Nice to know you like the plugin spacer

    ( REPLY )
  4. spacer
    Matt Bee
    September 13th, 2007 - 00:14

    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!).

    ( REPLY )
  5. spacer
    Jason Litka
    September 14th, 2007 - 07:16

    @pyko,

    I had been entering the character itself. I just tried the entity now and it works fine. Thanks for the help.

    ( REPLY )
  6. spacer
    pyko
    September 15th, 2007 - 13:44

    @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 spacer

    @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.

    ( REPLY )
  7. spacer
    Lazaros
    September 27th, 2007 - 20:36

    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 :
    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!

    ( REPLY )
  8. spacer
    pyko
    October 3rd, 2007 - 12:41

    Hi Lazaros,
    I’ve had a look at your site, I believe you mean:
    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 spacer

    ( REPLY )
  9. spacer
    Beaver
    November 22nd, 2007 - 02:02

    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!!

    ( REPLY )
  10. spacer
    jack
    December 11th, 2007 - 17:01

    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 spacer

    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 spacer

    ( REPLY )
  11. spacer
    Andi
    December 16th, 2007 - 05:57

    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?

    ( REPLY )
  12. spacer
    jack
    December 17th, 2007 - 01:34

    What I was suggesting is already possible… I just found out, after using WP for five years!!! spacer

    codex.wordpress.org/Customizing_the_Read_More

    ( REPLY )
  13. spacer
    baron
    May 11th, 2008 - 02:29

    hi. Thanks for plugin

    perfect.

    regards

    ( REPLY )
  14. spacer
    Victor Sergienko
    July 4th, 2008 - 21:46

    htmlentities() messes up UTF-8 text.
    Using htmlspecialchars() instead helped.

    ( REPLY )
  15. spacer
    Reppils
    September 2nd, 2008 - 00:50

    Thanks for the plugin, this is what i am looking for so long time~ cheers

    ( REPLY )
  16. spacer
    Bryan Eggers
    December 19th, 2008 - 16:47

    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!

    ( REPLY )
  17. spacer
    Colin
    March 5th, 2009 - 02:08

    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

    ( REPLY )
  18. spacer
    GeorgWP
    August 15th, 2009 - 17:12

    As for the Danish translation, this reveals that the plugin is capable of being translated into almost any language!

    ( REPLY )
  19. spacer
    Tim
    September 10th, 2009 - 10:35

    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

    ( REPLY )
  20. spacer
    Tim
    September 10th, 2009 - 10:36

    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

    ( REPLY )
    • spacer
      pyko
      September 10th, 2009 - 23:21

      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

      ( REPLY )
  21. spacer
    Jaime
    September 25th, 2009 - 12:36

    Hi,
    Simple and beautifull plugin. Thanks!!

    ( REPLY )
  22. spacer
    Rachel Goldstein
    November 13th, 2009 - 00:42

    Nice plugin, thank you. Is there any way to change the font size for the “more” link?

    ( REPLY )
  23. spacer
    Chris
    November 20th, 2009 - 09:16

    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

    ( REPLY )
  24. spacer
    Storm
    September 2nd, 2010 - 23:15

    Also would like to know how to make the link nofollow

    Thanks

    ( REPLY )
  25. spacer
    Zack
    February 25th, 2011 - 14:16

    I have just installed this amazing plugin and its working great, i have one question where do i need to check to change the font and the font size please help me out

    regards,

    Zack

    ( REPLY )
    • spacer
      pyko
      February 25th, 2011 - 16:01

      Hi Zack,
      Great to know you like the plugin and it’s working for you spacer

      Currently, you can’t actually change the font style using the plugin. However, had a quick look (haven’t tested, but should work) you can add a custom CSS style to the class “more-link” to modify the font.

      Cheers,
      Peggy

      ( REPLY )
      • spacer
        Zack
        February 26th, 2011 - 00:45

        Thank you for your fast reply,
        I am a newbie when it comes to CSS spacer but i will try Google it and hopping i will manage
        something. I will post the results.

        Regards,
        Zack

  26. spacer
    Christian
    June 23rd, 2011 - 17:37

    Great plugin, thanks.
    I wanted to let u know that I modified it a bit, so now I am able to add tags to the Link Display Options’ Custom Link Text, which enables full styling of the more link, including images.

    ( REPLY )
    • spacer
      pyko
      June 23rd, 2011 - 18:41

      No problems, nice to know you’re finding it useful spacer

      In my most recent update (v1.0.3) I actually allowed images as well in the link, but good to know you got it working the way you like it spacer

      ( REPLY )
  27. spacer
    markfromireland
    July 18th, 2011 - 00:43

    Handy liitle thing. I detest that jump. FYI am running WP3.2.1

    markfromireland

    ( REPLY )

Leave a comment Cancel reply

(required)

(required)

Madbutterfly · Graphic and Web Design from Hugh Collier
Tilpas Mere-linket
Blog migration… « psychopyko
KOCHWERKSTATT Wo es so lecker ist!
Tutorial 5: 41 Wordpress Plugins That Will Give Your Blog Superpowers. | figure4media.com
Tutorial 5: 41 Wordpress Plugins That Will Give Your Blog Superpowers. | insiders
41+ WordPress Plugins That Will Give Your Blog Superpowers. | insiders

Pages

  • About
  • Downloads
    • More Link Modifier

Categories

  • Cool stuff
  • General
  • Nifty tips
  • Tutorial
  • Uncategorized

Blogroll

  • flickr
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.