Ready to get started?Download WordPress


Easy way to link to another post without risking to break urls

  1. Thierry


    Right now, if you want to create a link to another of your post, you have to get to the public section of your blog, copy the url of the post you want to link, get back to the admin interface and paste the url.
    If you ever want to change the permalink structure (it's not a very good idea, but you maybe have a reason to do it), all the links inside your posts to others posts will be broken.

    There should be a solution for this. There is a special tag to insert the "Read more" link, there could be a special tag to insert a link to one of our post.

    I am not suggesting the syntax of the tag, but just the idea. We could have someting like <!--42:The text of my link-->. There is two parts in this special tag. The first one is the id of the post, the second one, is the text that should be use for the link. If there is no text (<!--42-->), the title of the blog post should be use for the link.

    Like this, we would never get afraid to break our links. WordPress would do the hard work of creating the link to the post (using the id number in the special tag) each time the page is displayed.

    Posted: 5 years ago #
  2. <?php get_permalink('100'); ?>

    Something like that should work, but you need a PHP plugin to write PHP within your posts.

    This should be a really easy plugin to make with shortcodes. Something like this should work:

    [permalink = "100"]

    What do you think? I could probably quickly write something like this.

    Posted: 5 years ago #
  3. I just wrote a plugin for this: Get Permalink plugin.

    You can use shortcodes like this:

    [permalink href="100"]Hello world[/permalink]
    Posted: 5 years ago #
  4. Malaiac


    plugins and shortcodes are ok for adv users.
    My users are almost computer illiterate and still need to put lnks into their posts.
    It should be integrated, with a one click button.

    Posted: 5 years ago #
  5. I very seriously doubt you'd see something like this integrated with a one-click button. A plugin is about the best you can probably hope for.

    The shortcode API was actually made for less-advanced users. Advanced users would use PHP and the get_permalink() function to do this.

    Posted: 5 years ago #
  6. Ahmet Topal


    I think, its very easy and you dont need any plugin...

    You have written, that the permalink can change... but there is one, that leaves ever, use this if you want:

    yourdomain.com/?p=ID after a slash in your domain write ?p= and then the id of the Post, then if you change the structure, the link will leave...

    my Idea...

    I'm on the way to write one easier plugin for that, i will give the link

    Posted: 5 years ago #
  7. Misamee

    I think that with FCKEditor would be easy (for a developer) to implement an additional interface for the link button, showing a list of posts.
    This would be the best way for illiterate users, but also for lazy people like me :D

    Posted: 5 years ago #
  8. mdocter


    Hi there! I ran into the same problem. I can't understand why WP isn't adding this as a default feature. Luckily, after a very very very long search, I found this plugin:


    It can use some visual upgrade, but it does what it should do.

    Good luck! I hope this helps.

    Maarten Docter

    Posted: 5 years ago #
  9. net38


    The ability to quickly cross reference posts within the same blog seems rather fundamental to me. I just started out with my blog, and after only only a few posts I already wanted to write a new post that referred back to an earlier one. It would be great if there was a built in way to do this more easily than by pasting the URL (and which was immune to permalink structure changes).

    Posted: 5 years ago #
  10. porle

    I agree this is a fundamental requirment. Why not just list all the post / page names in the Insert / Edit Links dialouge box that appears when the link button is clicked on the visual editor? It already has drop downs for classes so its able to access static content from a file. I dont think its a huge leap to access similar info from the database.

    Anyway, it seems some plugins do similar, i will try them out.

    Posted: 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    10 Votes
  • Status

    This idea is under consideration