WordPress.org

Support

Support » How-To and Troubleshooting » Replacing Permalink With wp.me Shortlink?

Replacing Permalink With wp.me Shortlink?

  • I am using the AddThis plugin to share blog posts. I currently have code that says:

    <?php do_action('addthis_widget', get_permalink(), the_title('', '', false)); ?>

    I would like this to use the wp.me shortlink instead of the permalink because one of the apps I’m sharing to is Twitter.

    Is this possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    Yes.

    First, you need to upgrade to WP 3.0.

    Second, you need to install and configure the Stats plugin: http://wordpress.org/extend/plugins/stats/ . This is necessary because wp.me links are implemented through WordPress.com, and the stats plugin is what links your site to the backend systems of WordPress.com.

    Third, you’ll use the wp_get_shortlink() function instead of get_permalink().

    That’s all there is to it, basically.

    Thanks.

    I was hoping to implement it in 2.9.2 because I usually like to wait awhile before upgrading to new versions. I already have wp-stats so I thought there would be a way to grab the shortlink.

    I guess I’ll just have to upgrade first, unless someone else has another solution.

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    You really should upgrade anyway.

    Still, try calling wpme_get_shortlink() instead.

    You are AWESOME, Otto. That worked perfectly. And when I upgrade to 3.0 (or 3.01) all I have to do is take the “me” out of the code.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replacing Permalink With wp.me Shortlink?’ is closed to new replies.