I have been trying to integrate a custom Wordpress plugin called custom_rss
into Wordpress by following http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/
.
I have successfully achieved the proper URL in the menu items for settings
. However, when I click on the custom_rss
link under settings, the url that loads the plugin just returns content with the text You do not have sufficient permissions to access this page.
. I am logged in as the super user admin.
The script that fires when the menu item is clicked is wordpress/wp-admin/options-general.php
which passes page as its parameter :options-general.php?page=CustomRSSGenerator
.
Does anyone have any ideas about how to allow privileges for this page or better yet, has anyone found out how to do a custom plugin for Wordpress 3.5.2 who can offer a solution to my problem? This has been beating me for about a week now and any advice is appreciated.
So there is a solution!
If you read the comments below the tutorial you will find a comment by a Robert character which states:
Great article. 2 things: 1. The following code produces an error in Admin panel, that makes the page inaccessible:
add_options_page("OSCommerce Product Display", "OSCommerce Product Display", 1, "OSCommerce Product Display", "oscimp_admin");
ERROR: "You do not have sufficient permissions to access this page."
To remove this error, modify the above code to:
add_options_page("OSCommerce Product Display", "OSCommerce Product Display", 1, "OSCommerce_Product_Display", "oscimp_admin");
That change will help you display the page correctly when the link "OSCommerce Product Display" is clicked under the "Settings" menu option. Hope this helps anyone who experienced a problem with the code.
- "The first parameter of this function is the option name which will be sued later to uniquely identify this option and its value." It should have been "used" but incorrectly spelled as "sued". Not a big deal, but just wanted to let you know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With