Custom Wordpress 3.5.2 plugin “You do not have sufficient permissions to access this page.”

前端 未结 2 1932
星月不相逢
星月不相逢 2021-01-13 15:47

I have been trying to integrate a custom Wordpress plugin called custom_rss into Wordpress by following http://net.tutsplus.com/tutorials/wordpress/creati

2条回答
  •  盖世英雄少女心
    2021-01-13 15:58

    Posting on this old topic because it was the most relevant Google result when I was searching after running into a similar problem so I figured I'd add my fix.

    I had a really similar problem where any change I made to the page slug resulted in an insufficient permission error. At first I thought my page slug must be getting referenced somewhere else in my code so I searched and found no other references. I also tried stripping away every line of code outside of the basic plugin instantiation code but it still didn't work.

    The fix was to deactivate then reactivate the plugin (within admin UI). I'm guessing upon plugin activation wordpress adds various entries to it's DB; some of which are likely your plugins name, menu page names, slugs, etc. After reactivating the plugin, the exact code that previously threw permission errors now worked perfectly.

提交回复
热议问题