When building a plugin that has its own settings page, it’s often handy to create a link to the settings page straight from the Plugins list – this saves users the time it takes to find where exactly your plugin appears in the admin menu. Here is a simple code snippet that creates the settings link for you – all you need to do is tell it where to go:

Simply replace the href attribute with the link to the plugin settings page and rename the function to something slightly more unique (preferably all wrapped in an if(!function_exists()) conditional).

12 Comments

  1. Hi: I really appreciate this post. It will allow me to (optionally) remove one page from the Admin menu, however, when I click the link, I get the “You do not have sufficient permissions to access this page” message. Any idea what would cause this?

    Like

  2. Hugh, I’ve been trying to figure this out forever now and kept putting it on the back burner because I was getting frustrated trying to Frankenstein code in from other plugins. You’re my hero.

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s