WordPress Plugin to Remove Shortlink

For those who do not want the automatically generated shortlink generated by WordPress, here is a plugin that will stop the link from being created. Add the below code to a .php file and upload it to your plugin directory. Once uploaded, activate the plugin from your dashboard and the shortlink will not appear for your site.

Plugin Name: WP Shortlink Remover
Plugin URI: https://www.dalesandro.net/
Description: WordPress plugin to remove shortlink from header.
Version: 1.0
Author URI: https://www.dalesandro.net/

remove_action('wp_head', 'wp_shortlink_wp_head');

Leave a Comment