is there a way to post a permalink into a post from "inside" the post? (8 posts)

  1. online
    Posted 5 years ago #

    I don't mean a relative link, but rather a link that if the post were copied to another WP-installation would still point to the original post ... so basically a code that actually writes a post's permalink into the post (and hyperlinks it to that address)

  2. Save your post as a draft, then copy the permalink that shows right under the title.

  3. online
    Posted 5 years ago #

    yes, but it seems like there's no plugin or syntax for doing it without all that hassle of save / copy / paste / save again, or is there?

  4. Tim Moore

    Posted 5 years ago #

    Until a post is saved, there isn't a permalink available. So you have to at least create the post and save it as a draft before you can do anything. From there, it's quicker/easier to just copy/paste as Andrea said than to try and get code to do it for you.

  5. online
    Posted 5 years ago #

    yea, I guess I wouldn't want to have to write something that would be able to do that (esp. since I'm at the level of php-newbie at best)

    alternatively, would it be easy / difficult to write a plugin that combs all posts within the past day (or so) and updates them with their corresponding permalink? or even in a "URL shortener" fashion?

    as you might be able to tell, this is really bugging me :/

  6. Tim Moore

    Posted 5 years ago #

    You could do something with a shortcode (http://codex.wordpress.org/Shortcode_API). That way, in any post, you put the same shortcode in and it generates the permalink based off the current post.

    But most themes have a permalink hyperlink when they are displayed on the web, anyway. Is that not sufficient?

  7. And in 3.1, they've alreayd built in an easy way to pick out internal links of the posts you have previously written, but again. they have to be actually posted.

    (also note this is generic WP. nothing multisite specific about it.)

  8. Also, if you;re doing this solely as a way to link back to your site if and when the posts are scraped... get a feed notice plugin.


    When scrappers pull your post, there will be a big ol' footer message go with ti. makes their site look pretty ugly and can include links back to your site and a big old "HEY STOP SCRAPING!" message if you wish.

Topic Closed

This topic has been closed to new replies.

About this Topic