Are you looking for a way to remove the links from manager menu in WordPress admin? While there’s probably a plugin for this, we have created a quick code snippet that you can use to remove links manager admin menu in WordPress.
Instructions:
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
add_action( 'admin_menu', 'remove_links_menu' ); function remove_links_menu() { remove_menu_page('link-manager.php'); }
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 7 best WordPress poll plugins and 24 best WordPress multi-purpose themes.
From Codex:
Removing the Link Manager
If you upgraded from a version prior to 3.5, you may still have the link manager in the sidebar, even if it is not needed. To remove this, edit the “Link Manager Enabled” field from 1 (on) to 0 (off) in /wp-admin/options.php or through any database manager.
Or add this code to your functions.php file:
update_option( ‘link_manager_enabled’, 0 );
Adding the Link Manager
To re-enable the link manager, add the following line to your theme’s functions.php file:
add_filter( ‘pre_option_link_manager_enabled’, ‘__return_true’ );
thanks, It worked for me
Glad it helped 🙂