• Love the plugin, thanks. And I got it to work easily with a custom short domain for the shortlink, once I figured out an error (?) in your FAQ:

    How do I include a shortlink using PHP?
    <?php wpbitly_shortlink(); // shortcode shweetness. ?>

    I could not get wpbitly_shortlink to work, so I started looking around and found that wp_get_shortlink did work and am using it now.

    You’re plugin is a thing of beauty, and does exactly what I need. Thanks again!

    https://www.ads-software.com/plugins/wp-bitly/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mark

    (@delayedinsanity)

    Glad it’s working for you, and thank you for taking the time to let me know it’s useful.

    I could do a little work on documenting wpbitly_shortlink() I think. It’s built to work as the callback for the [wpbitly] shortcode… which I may have also forgotten to document? I’ll have to go check, because now I’m not sure.

    If it isn’t able to get the post ID on its own, you can pass it in via an attributes array, like so:

    wpbitly_shortlink( array( 'post_id' => 22 ) );

    Hi Mark,
    i’m trying to use the shortlink but it dosen’t works..

    i’ve tried specifiing the post id, but nothing happens
    `wpbitly_shortlink( array( ‘post_id’ => 22 ) );

    I think you need to pass an “echo” to have it work. <?php echo wp_get_shortlink; // Yah Echo ShortCode?> Work well ??

    Will you update your Script ? No XSS security issue ?

    Just use this:

    <?php echo wp_get_shortlink(); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error (?) in your FAQ’ is closed to new replies.