Support » Plugin: YOURLS Link Creator » Duplicate Shortlink Ref

  • Recently I installed this plugin and everything is working like a charm. Except because today I noticed that we have a duplicate ref=”shortlink” in the html code of every page/post. The one inserted by WP and the one inserted by this plugin, both contain the same shorturl, so I don’t understand why the plugin is inserting again this line.

    Also, I noticed that you are not prefixing your functions, would be a good idea to do that to avoid conflicts with another plugin. (Just a suggestion)

    i.e. function ylk_yourls_shortlink() {}

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


    are you running any other plugins that may add this? perhaps Jetpack?

    as for the function names, I’m aware there are a few that are more generic in nature.

    Thread Starter QROkes


    I’m not using Jetpack, but

    <link rel='shortlink' href='' />

    is a WP feature, so it’s inserted by WP core and the plugin insert this again.

    Now, I’m removing the one inserted by WP and leaving the one inserted by the plugin just to not have a duplicated line.

    remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);

    Plugin Author Andrew Norcross


    Ahh, I see now. There’s two functions in the plugin. One to manually insert the link, and one to filter the core function. So in this case, it’s operating twice. I’ll add a check in the next release to make sure it isn’t duplicated. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicate Shortlink Ref’ is closed to new replies.