• Resolved Rikk03

    (@rikk03)


    Hello Andrew,

    Whilst im here posting a bug I thought I would ask this also ……

    Is there a way to output the raw short url like in Oz’s old plugin (template tag)?

    wp_ozh_yourls_raw_url(true);

    Similar to how wp_get_shortlink works?

    IT would be great for adding to social share buttons. I have successfully got my “simple social share plugin” to use the wp_get_shorturl, very simple one line code change that would work with yourls if you can do it.

    Regards,

    R:

    https://ww.wp.xz.cn/plugins/yourls-link-creator/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Norcross

    (@norcross)

    the shortlink should already be getting that URL, but I can add a template tag to fetch the short one as well.

    Thread Starter Rikk03

    (@rikk03)

    Great,

    I did try the do_action yourls in the place of wp_get_shortlink – didnt work.

    No, the “simple social share” plugin did not get the yourls shortlink but rather the wp shortlink for some reason.

    Bypassing your plugin somehow.

    Another mystery.

    Plugin Author Andrew Norcross

    (@norcross)

    using the wp_get_shortlink should return the YOURLS URL if one exists in the WP database. however, I am adding another tag just in case.

    Plugin Author Andrew Norcross

    (@norcross)

    I added the original function from Ozh’s plugin, as well as get_yourls_shortlink, and also tested that wp_get_shortlink is returning the short URL if one exists. it WON’T make one, though.

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

The topic ‘Raw URL’ is closed to new replies.