{"id":661,"date":"2013-06-20T10:18:51","date_gmt":"2013-06-20T10:18:51","guid":{"rendered":"http:\/\/w3bits.com\/?p=661"},"modified":"2015-05-11T17:29:04","modified_gmt":"2015-05-11T17:29:04","slug":"plugin-settings-link","status":"publish","type":"post","link":"https:\/\/w3bits.com\/plugin-settings-link\/","title":{"rendered":"Add Plugin Settings link to plugin page in WordPress"},"content":{"rendered":"<p>WordPress developers do many custom things with their plugins and themes above the basic functionality available at WordPress Codex. Adding a plugin settings link in the plugin page just beneath your plugin could be one of those pretty custom things. If you don&#8217;t know what I&#8217;m saying, have a look at highlighted sections in the below screenshot:<br \/>\n<img decoding=\"async\" src=\"https:\/\/w3bits.com\/wp-content\/uploads\/2013\/06\/plugin-settings-link.gif\" alt=\"Plugin settings link in WordPress\" title=\"Plugin settings link in WordPress\" \/><br \/>\nI did a quick research and found this cool snippet that lets you add the plugin settings page link beneath your plugin on the plugins page in WordPress.<\/p>\n<pre><code>function my_plugin_settings_link($links) { \r\n  $settings_link = '&lt;a href=\"options-general.php?page=<font color=\"green\">plugin-options.php<\/font>\"&gt;Settings&lt;\/a&gt;'; \r\n  array_unshift($links, $settings_link); \r\n  return $links; \r\n}\r\n$plugin = plugin_basename(__FILE__); \r\nadd_filter(\"plugin_action_links_$plugin\", 'my_plugin_settings_link' );<\/code><\/pre>\n<p>Just add the above code to your plugin PHP file, and don&#8217;t forget to replace the text in green to your plugin settings file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress developers do many custom things with their plugins and themes above the basic functionality available at WordPress Codex. Adding a plugin settings link in the plugin page just beneath your plugin could be one of those pretty custom things. If you don&#8217;t know what I&#8217;m saying, have a look at highlighted sections in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":739,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[14],"class_list":["post-661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-snippets"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add Plugin Settings link to plugin page in WordPress<\/title>\n<meta name=\"description\" content=\"Easily add a plugin settings link beneath your plugin in WordPress plugin page using this small code snippet. PHP Snippet for WordPress plugin developers..\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/w3bits.com\/plugin-settings-link\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add Plugin Settings link to plugin page in WordPress\" \/>\n<meta property=\"og:description\" content=\"Easily add a plugin settings link beneath your plugin in WordPress plugin page using this small code snippet. PHP Snippet for WordPress plugin developers..\" \/>\n<meta property=\"og:url\" content=\"https:\/\/w3bits.com\/plugin-settings-link\/\" \/>\n<meta property=\"og:site_name\" content=\"W3Bits\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-20T10:18:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-11T17:29:04+00:00\" \/>\n<meta name=\"author\" content=\"Rahul\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@w3bits_\" \/>\n<meta name=\"twitter:site\" content=\"@w3bits_\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rahul\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/w3bits.com\/plugin-settings-link\/\",\"url\":\"https:\/\/w3bits.com\/plugin-settings-link\/\",\"name\":\"Add Plugin Settings link to plugin page in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/w3bits.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/w3bits.com\/plugin-settings-link\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/w3bits.com\/plugin-settings-link\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2013-06-20T10:18:51+00:00\",\"dateModified\":\"2015-05-11T17:29:04+00:00\",\"author\":{\"@id\":\"https:\/\/w3bits.com\/#\/schema\/person\/be0e5389728f04fca3db34bad77ef1ac\"},\"description\":\"Easily add a plugin settings link beneath your plugin in WordPress plugin page using this small code snippet. PHP Snippet for WordPress plugin developers..\",\"breadcrumb\":{\"@id\":\"https:\/\/w3bits.com\/plugin-settings-link\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/w3bits.com\/plugin-settings-link\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/w3bits.com\/plugin-settings-link\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/w3bits.com\/plugin-settings-link\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/w3bits.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Plugin Settings link to plugin page in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/w3bits.com\/#website\",\"url\":\"https:\/\/w3bits.com\/\",\"name\":\"W3Bits\",\"description\":\"Web Development Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/w3bits.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/w3bits.com\/#\/schema\/person\/be0e5389728f04fca3db34bad77ef1ac\",\"name\":\"Rahul\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/w3bits.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e574a987fbce499dc42961a23e1dfd9bfddadff03a41086b4eea64154d266b29?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e574a987fbce499dc42961a23e1dfd9bfddadff03a41086b4eea64154d266b29?s=96&d=mm&r=g\",\"caption\":\"Rahul\"},\"description\":\"I'm Rahul, a web enthusiast and the person responsible for all the content you read here on W3Bits.\",\"url\":\"https:\/\/w3bits.com\/author\/meadminrahul9\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add Plugin Settings link to plugin page in WordPress","description":"Easily add a plugin settings link beneath your plugin in WordPress plugin page using this small code snippet. PHP Snippet for WordPress plugin developers..","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/w3bits.com\/plugin-settings-link\/","og_locale":"en_US","og_type":"article","og_title":"Add Plugin Settings link to plugin page in WordPress","og_description":"Easily add a plugin settings link beneath your plugin in WordPress plugin page using this small code snippet. PHP Snippet for WordPress plugin developers..","og_url":"https:\/\/w3bits.com\/plugin-settings-link\/","og_site_name":"W3Bits","article_published_time":"2013-06-20T10:18:51+00:00","article_modified_time":"2015-05-11T17:29:04+00:00","author":"Rahul","twitter_card":"summary_large_image","twitter_creator":"@w3bits_","twitter_site":"@w3bits_","twitter_misc":{"Written by":"Rahul","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/w3bits.com\/plugin-settings-link\/","url":"https:\/\/w3bits.com\/plugin-settings-link\/","name":"Add Plugin Settings link to plugin page in WordPress","isPartOf":{"@id":"https:\/\/w3bits.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/w3bits.com\/plugin-settings-link\/#primaryimage"},"image":{"@id":"https:\/\/w3bits.com\/plugin-settings-link\/#primaryimage"},"thumbnailUrl":"","datePublished":"2013-06-20T10:18:51+00:00","dateModified":"2015-05-11T17:29:04+00:00","author":{"@id":"https:\/\/w3bits.com\/#\/schema\/person\/be0e5389728f04fca3db34bad77ef1ac"},"description":"Easily add a plugin settings link beneath your plugin in WordPress plugin page using this small code snippet. PHP Snippet for WordPress plugin developers..","breadcrumb":{"@id":"https:\/\/w3bits.com\/plugin-settings-link\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/w3bits.com\/plugin-settings-link\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/w3bits.com\/plugin-settings-link\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/w3bits.com\/plugin-settings-link\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/w3bits.com\/"},{"@type":"ListItem","position":2,"name":"Add Plugin Settings link to plugin page in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/w3bits.com\/#website","url":"https:\/\/w3bits.com\/","name":"W3Bits","description":"Web Development Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/w3bits.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/w3bits.com\/#\/schema\/person\/be0e5389728f04fca3db34bad77ef1ac","name":"Rahul","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/w3bits.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e574a987fbce499dc42961a23e1dfd9bfddadff03a41086b4eea64154d266b29?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e574a987fbce499dc42961a23e1dfd9bfddadff03a41086b4eea64154d266b29?s=96&d=mm&r=g","caption":"Rahul"},"description":"I'm Rahul, a web enthusiast and the person responsible for all the content you read here on W3Bits.","url":"https:\/\/w3bits.com\/author\/meadminrahul9\/"}]}},"_links":{"self":[{"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/posts\/661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/comments?post=661"}],"version-history":[{"count":1,"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/posts\/661\/revisions"}],"predecessor-version":[{"id":2760,"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/posts\/661\/revisions\/2760"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/w3bits.com\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/media?parent=661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/categories?post=661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3bits.com\/wp-json\/wp\/v2\/tags?post=661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}