WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up a big blog for a client and we're looking to replace the wp.me shortlinks in the header and in everything with our custom domain on bit.ly.

I have working code to build the Shortlinks, im just wondering if there is any way to replace the functions so pressing "Get Shortlink" and tweeting links, would use our bit.ly

Is there a way to add action and replace the existing wp_get_shortlink and a like? To be clear, i want all the same functionality, just with a different short link.

share|improve this question
up vote 2 down vote accepted

Totally possible, here is a great walkthough: http://bavotasan.com/2010/create-bit-ly-short-urls-for-your-posts-in-wordpress/

Bullet points:

-Write a function that gets the bitly link upon publish

-Remove the default action and add your own

-Call wp_get_shortlink() like normal and bitly will be used

share|improve this answer
Bit.ly has released their own official plugin to do all this. wordpress.org/plugins/bitly – alpha1 Jun 20 '14 at 16:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.