Below are the possible ways in which access can be restricted to admin pages built with WP Admin Pages PRO (plugin coverage here).

1. When editing the Admin page

Add New screen of Admin Pages has a Permissions tab in the Advanced Options meta box.

Here you (admin) can check the roles that should have access to edit the admin page.

Details here.

It is also possible to limit access by usernames. See this KB article.

2. Screen Options

You can log in using the user’s account that should not see “Admin Pages” menu in the WP admin, then pull down Screen Options from the top right and uncheck ‘Display the “Admin Pages” menu item?’.

One problem with this approach is that if your client is tech savvy enough or like the curious George, he/she may reverse this setting, then see the Admin Pages menu item and mess things up to their heart content.

The next method addresses this problem.

3. Using a Filter

Adding the following using the Code Snippets plugin will ensure that the above Screen Options method does not function – meaning, only the admins will be able to access the Admin Pages admin menu.

add_filter( 'wu_apc_should_display_admin_menu', '__return_false' );

KB article regarding the last two methods is here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: