Support » Fixing WordPress » Replacing Permalink With 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 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) Admin


    First, you need to upgrade to WP 3.0.

    Second, you need to install and configure the Stats plugin: . This is necessary because links are implemented through, and the stats plugin is what links your site to the backend systems of

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

    That’s all there is to it, basically.


    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) Admin

    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.


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