You could set up a child theme, and in the single-listing.php
template, add conditions around the current code.
<?php
// If the user is not logged in, redirect
if ( false == is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
// Else the user is logged in; show the listing
else {
// Paste the regular template code here
}
?>
Everything else will remain public, while just the individual listings will force the user to be logged in before they can view the content. (This will also prevent search engines from seeing the content, so bear that in mind.)
Related Posts:
- Redirect User to Homepage if no other redirect is specified
- Redirect subscribers to last viewed page after log-in
- How to check User Role and redirect to specific page according to Role when login in WordPress?
- how redirect users to custom login page when “login to reply” is clicked? [duplicate]
- Specific Content on pages based on user
- Redirect based on log-in status per JavaScript
- Replacing the WordPress password validation
- WordPress auto login after registration not working
- Allow up to 5 Concurrent Login Sessions
- Why does is_user_logged_in() return false after redirect from another site?
- Pre-populate Username Field
- Redirect after User Activation [closed]
- Redirecting user after updating profile?
- How to keep track of user logins?
- Get user info outside WordPress
- How can I secure a WordPress blog using OpenID from a single provider?
- Is it possible to get a user with just the password field?
- Redirect after login based on user role (custom login page)
- Check for user meta data at Login
- My custom page template with is_user_logged_in() does not detect that I’m logged in
- Use phpbb user database for WordPress
- WordPress to use Drupal users’ credentials
- Redirect after users complete profile form
- Share user table from WP with Drupal
- How can I allow password reset based on logins containing the @ character?
- A way to count logged in users and display count?
- stop login if user_status equal zero
- Hide everything on site for visitors except specific page IDs
- Rule to redirect non logged in User to Custom Registration/login Page in .htaccess file
- How do i make my wordpress website private?
- Change the user_login at registration
- Max no of simultaneous active sessions for a single user
- When I try to login in wordpress it is showing “USER Doesn’t Exists”
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- Redirect user after successful email change
- wordpress disable login for unverified user
- WP_User_List -> How to open a new edit-page in WordPress admin backend!
- Reset Password policy
- Rewrite Rules and Login Issue
- Is possible to allow user to login with different role?
- How to stop redirect if user is already on correct page (Using Case Switch)
- Use WordPress Login for a non-wordpress site
- WP not logging in at first time
- WordPress Login Customization for External Authentication
- How to allow registered users to submit the form only 5 times per day?
- Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)
- Is there any action /filter hook I can use to disable login for some user role?
- Display video on homepage for users who have not logged in
- How can I do a url redirect to include a wordpress username?
- How do you manage your pages or functions that require logged-in users?
- Redirect logged on user to a specific page based on wp user role, page id
- How can i login with user’s password in WordPress being an admin?
- Should I setup frontend-only users as CPT or use a plug-in?
- Delete a user from frontend
- Redirect users after login
- Redirect user to login if not logged in, on specific pages
- Check if user is logged in via JS? [duplicate]
- redirect user to their profile after log in
- Use members from 1 site on another one
- WordPress Redirect Specific User. Tired of Peter’s redirect Plugin its not working
- Can I edit the database to change a login?
- Redirect current user to their most recent custom post
- User(s) already exists show error please provide a valid username
- wp_generate_password sets password but can’t login using created password
- Janrain/Simple Modal under Redirected Domain
- add class to element if user is not logged in [closed]
- Is there a way to call via javascript if a user is logged-in on a static html file?
- Restricting wordpress login sessions for a web app
- How to remember which page the user was on before logout?
- How to connect wordpress user with my own APP user?
- How to change default username field after login
- The same session information for peer users on two different WordPress servers
- WP users cant reset password
- Check for empty username or password on login
- Redirect /member/ to /member/user
- $user_login is not working if author has only 1 post
- How to use url formatter with integer
- user and usermeta table not found
- Redirect current user
- custom login form, guide me
- Front end login and page restriction
- Changing user_login ends current session
- Current User Seeing Another Logged In User Info
- Securely log in a user without a password using a link?
- Integrating Facebook Registration (and Login) on a WordPress page
- WordPress – Security Question at Login from User’s Meta Data
- Redirect user based on role when they try access a particular page
- determine active user browser at the same time
- How to track all users logged into a site?
- Cant edit profile from frontend
- How to authenticate/verify login credentials & check for user meta without logging in?
- Show only users with the same role in Dashboard user list
- Add custom input field in new user page
- Does wp_login hook fire on user registration?
- Website for online video conferences with students and teachers with WordPress?
- Multisite Login Access Restrictions
- Recognize logged WP user in existing REST API
- WordPress: New user role which is ONLY allowed to manage media
- wp_login_url always redirects me to wp-admin
- Unable to retrieve Users (Not logged in) through WP Rest API