Haven’t specifically done this yet but something similar
In the theme page/post template files you can get post id of current post/page by doing
$currentID = get_the_ID();
Then redirect all traffic not from the specified IPs
$ipArr = array('xx.xxx.xxx.xxx', 'xx.xxx.xxx.xxx');
if (!in_array(@$_SERVER['REMOTE_ADDR'], $ipArr))
{
header("Location: http://example.com/myhomepage");
die();
}
Related Posts:
- How to restrict attachment download to a specific user?
- Using JWT to authenticate a user with an external system?
- Allow anonymous user to access Themes Customizer
- Is there an existing capability to allow editing of only pre-existing pages? If not, a good way to implement this?
- How to make user inactive by default while registering?
- How to set privilege to wordpress subscriber for private page
- authenticate user without password from email activation link [duplicate]
- User Access Manager plugin
- Restrict post to user_id
- add_option_page capability behaving strange
- Access denied on Published Pages but not on WordPress /wp-admin/
- Allow non logged users to visit only login page and password reset page
- How can I allow users to make groupings of posts
- Is user listing on wordpress private?
- How to restrict logged user to view only certain pages?
- Limit post display to post authors and create an exception for specific pages
- How to “Global Ignore” / “Hell Ban” someone, restrict post visibility to the author only?
- Conditional menu for registerd users/guests (Genesis framework)
- How can I create an upload page for (and only visible to) specific users?
- remove wp admin menu by customer user role
- Custom Roles for access to specific term(s)
- ‘post’ only for editor and administrator
- Why: sticky front page code, shows latest non-sticky on logged-in front page
- Access denied error when logged in as admin
- Disable all admin UI access to authors (except to custom post type add, edit and modify)
- Hide all pages except landing page
- How to restrict access to a page?
- How can I change access permissions across many pages?
- How do I get the access type in WordPress?
- Profiles site with access levels
- User access control in sidebar archive and categorires
- Plugins that restrict access based on user group/roles
- Restrict access for wp-admin panel
- Specify the level of access to different pages at the time of user creation
- When add analytics script, wordpress user login not working
- Hide WordPress “wp-admin” dashboard to User IDS
- I cannot access but but wp-admin works normally
- about visibility in wordpress regarding of roles
- Can access main URL and Dashboard but not any posts or pages [closed]
- How to List only the users created by a particular user
- How to enable to the user send content and save as draft entry?
- How to give members access to their own protected page?
- Use WordPress engine for user registration and management
- How to make future posts visible to selected visitors without login
- Add existing user as administrator
- Split post edit screen into sub-edit screens for users, is this good or bad, and is it possible?
- Suggestions for allowing basic users to view their own posts?
- How to restrict posts only from a certain category
- Two users attempt to modify a page
- Allow member to have access to custom post type only. Permission to only edit their own posts
- How do I create a custom role capability?
- How to programatically change username (user_login)?
- HTTPS leads to Sorry, you are not allowed to access this page
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- Restrict admin access to certain pages for certain users
- Make A WordPress Page Accessible To Admins Only, Redirect Other User Roles
- Only allow administrators and editors to access wp-admin
- How can I hide media library images from general users?
- How to restrict a page [without plugin]
- Only show category to certain user levels without plugin
- if role is logged in then do something
- Add new media uploader at frontend for wp 3.5+
- Front end user meta options for users
- how to update current logged user username
- Capability for allowing user to post own comments without moderation
- Why is the reset password key missing in the reset password email?
- Hide Specific User Page
- Making a Custom Post type only visible to non-users via a specific link
- Add a wordpress blog to my website having users
- Protect custom php file with login
- show text If special user is logged
- Dangers to allowing Access-Control-Allow-Origin: * for Feeds only?
- Restrict Author role to only 3 wp-admin pages
- Allow user access to Dashboard only!
- How to restrict access to image folder depending on whether product is purchased or not?
- Why does get_posts only show results for Admins or logged-out users?
- Users can only view their content from the front end
- Make pages visible to only logged in members
- access control for assets in a website powered by wordpress
- Restrict access to trash, only admin
- How to restrict an admin page, if the user is not superadmin?
- Redirect admin 403 “Cheatin uh?” admin pages
- Usage of var keyword in the core
- How to create a front facing user sign up, log in and profile pages like FoodGawker.Com [closed]
- Is WordPress secure enough for a multi-user article directory?
- User generated content and security
- define two login page url
- Is there a way to create folders restricted to specific users to open?
- Admin Page access
- How to generate expiring URL of the page?
- grant multiple roles access to specific admin menu item
- Email post to submitter
- How do I restrict a second admin certain access?
- Wordress admin page is fetching error You do not have sufficient permissions to access this page.
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- How do I control the list of Pages an author can see?
- limit the access to uploaded files
- Randomize access to post
- How to block external download link access if visitor not referred from WP?
- Multisite Login Access Restrictions