Forums

Plugin: Easy Post-to-Post Links (9 posts)

  1. coffee2code
    WordPress & Plugin Dev
    Posted 7 years ago #

    Plugin: Easy Post-to-Post Links

    Description:
    Easily reference another post in your blog using a shortcut, either by id or post slug. The shortcut is replaced with the hyperlinked title of the referenced post

    Details can be found at the plugin's homepage:
    http://www.coffee2code.com/archives/2005/03/23/plugin-easy-post-to-post-links/

    All of my plugins can be found at:
    http://www.coffee2code.com/wp-plugins/

    So what does it actually do?

    In your post you can type <!--post="1"--> and when the post appears on your blog, that shortcut will be replaced by the title of the post with the ID of the quoted number hyperlinked to that post's permalink page, i.e. <a href="http://example.com/2005/03/23/hello-world/"> "Hello World"</a>.

    You can also put the post slug within the double-quotes (i.e. <!--post="hello-world"--> for the same effect.

    The plugin also adds a quicktag button (which can be disabled) that'll insert the <!--post=""--> for you; you just need to put a value between the double-quotes.

  2. Root
    Member
    Posted 7 years ago #

    This is going to be extremely handy. Thanks.

  3. davidchait
    Member
    Posted 7 years ago #

    Just so people know, if you don't want the title but just want a tagged permalink, CG-Inline already does something similar. Just use:
    <!--permalink:53.Link Mouseover:in-body link text-->

    -d

  4. Lorelle
    Member
    Posted 7 years ago #

    You are a total and complete dream come true - both of you. And David, I have been pouring over your codes and totally and completely missed any instruction on how to use CG-Inline. Thanks for mentioning it.

  5. Jinsan
    Member
    Posted 7 years ago #

    brilliant - this will be great. Thanks again

  6. davidchait
    Member
    Posted 7 years ago #

    Thanks Lorelle. I need to add updated instructions for CG-Inline... they don't have any of the new stuff, and mostly focus on the Amazon integration. But the [permalink], [pagelink], [linkto], [query], and other macros are all there and quite useful... Actually, I'm going to go add an option for the next release that pulls the post-title automatically if you don't supply any text -- that's a good idea for quick links (though I've always found I have 'running text' and want to specify the link text myself...).

    -d

  7. angsuman
    Member
    Posted 7 years ago #

    However my challenge is that I don't remember the ID's of the posts :)

    So I am forced to do a search and then copy-pasting the permalink isn't much of an issue.

    Any ideas?

  8. coffee2code
    WordPress & Plugin Dev
    Posted 7 years ago #

    Do you remember the post's title? You can reference the post slug, which is a "nice" version of the title. For example, a post titled "Hello, Crazy-craZy World!!" would have a slug of "hello-crazy-crazy-world". (Basically, make the title all lowercase, replace spaces with "-", keep any existing "-", remove all other non-alphanumeric characters.)

    Thus, with slug in hand, you can use this plugin to reference the post:
    <!--post="hello-crazy-crazy-world"-->

    And even if you have to search out the post ID, it's still faster to press the "post link" quicktag button and type in a number rather than copying over both the post's permalink and title to create the full link.

  9. ralph
    Member
    Posted 7 years ago #

    coffee2code: What if I don't want the post's title as the output? What if I want to put my own text?

    EG:
    <!--post="hello-world"="my article which I posted last month"-->
    IE:
    <!--post="post-slug/post-id"="text to be displayed"-->

    If this is not available for the current plugin, what are the chances you'd be able to implement this feature in future releases?

    --------
    I've also noticed that a customized permalink to a post (eg, if you just put /yyyy/mm) returns errors.

Topic Closed

This topic has been closed to new replies.

About this Topic