Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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 at 16:04

Your Answer

 
discard

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.