Plugin Development

Add Additional Links To The WordPress Plugin Admin

Here is a useful snippet submitted by SHelfinger.EU.

When you activate a plugin in WordPress the author can place links in the plugin dashboard screen to show the users of the plugin links back to the plugin homepage, support page, FAQs or a way to contact the creator of the plugin.

By default WordPress will add the name of the author and a link back to the plugin homepage.

Using this snippet you can add extra links to this section like the image below from the Antivirus WordPress plugin.

All you have to do is add the following in your plugin file and it will create new links for plugin.

add_filter('plugin_row_meta',  'Register_Plugins_Links', 10, 2);
function Register_Plugins_Links ($links, $file) {
               $base = plugin_basename(__FILE__);
               if ($file == $base) {
                       $links[] = '<a href="admin.php?page=settings_plugin">' . __('Settings') . '</a>';
                       $links[] = '<a href="">' . __('FAQ') . '</a>';
                       $links[] = '<a href="">' . __('Support') . '</a>';
                       $links[] = '<a href="">' . __('Google Plus Page') . '</a>';
               return $links;

Plugin Action Links

If you have a settings page for your plugin then it could be useful to add a link to the settings page from the plugin menu.

The below WordPress snippet will allow you to add links to the left side menu on the plugin screen.

add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'link_action_on_plugin' );
function link_action_on_plugin( $links ) {
	return array_merge(array('settings' => '<a href="' . admin_url( '/wp-admin/tools.php?page=the-plugin-settings-page.php' ) . '">' . __( 'Settings', 'domain' ) . '</a>'), $links);
Back to top

Learn how to code with Treehouse

  • Learn projects with access to 1000+ videos
  • Practice live with our Code Challenge Engine
  • Get help in our members-only forums

Start with a 7 day free trial