WPSurfer.com

How to Remove Shortlink in WordPress

Published on September 24, 2022 | Updated on October 23, 2024

In WordPress, a shortlink is a shortened version of a full URL for a post or page. Shortlinks are useful because they provide a cleaner, more concise URL that’s easier to share on social media, emails, or other places where character count matters.

If you want to remove shortlinks from appearing in WordPress, such as in the front-end meta tags, you can do this by using a code snippet.

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

Manuel Campos

I am José Manuel. I am writing about things I know and things that I am learning about WordPress. I hope you find the content of this blog useful.