Skip to main content
00-BBB's user avatar
00-BBB's user avatar
00-BBB's user avatar
00-BBB
  • Member for 7 years, 8 months
  • Last seen more than a month ago
comment
Change Order of Admin Posts Depending on Meta
Important note - the code in the answer did break the frontend of the website - 'PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen()'. To fix this I just had to move the 'is_admin()' check outside the 'get_current_screen()' function.
comment
Change Order of Admin Posts Depending on Meta
Works in 2021! (Surprised this is not the default behaviour?!)
comment
How do I fix the "sorry, you are not allowed to access this page" error I get on the "plugins > settings" links?
Yes, in my case there was no row for 'wp_capabilities' or 'wp_user_level' in wp_usermeta for the new admin user I had created. I created 2 new rows with the above & wp_user_level = 10
comment
How to enable a custom post type to custom user role in WordPress
Perfect, thanks! One gotcha I encountered: "If you are defining a custom role, and adding capabilities to the role using add_role(), be aware that modifying the capabilities array and re-executing add_role() will not necessarily update the role with the new capabilities list. The add_role() function short-circuits if the role already exists in the database. The workaround in this case is to precede your add_role() call with a remove_role() call that targets the role you are adding." codex.wordpress.org/Function_Reference/…
awarded