-
Author
-
February 16, 2018 at 02:04 #188825felixParticipant
Hi there.
When I turn on Private Site option in the Theme Options Panel I can include page exceptions and it works fine.
But the problem is that any event simple page redirects non-logged users to the custom redirect login page.
Can I set event simple pages as an exception as well?
Thans in advance!
February 17, 2018 at 16:26 #188930Kieran_SQModeratorHi,
Currently the Restrict My Site plugin does not support allowing singular custom post types to be set as an exclusion. If you needed a custom post type to be viewable you will need to look at alternative options to our plugin.
If you would like I can add this ticket to the feature request queue for the community to vote on? Let me know.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
February 17, 2018 at 17:23 #188948felixParticipantThank you Kieran.
And could you please provide me a function or hook to include these exceptions manually in my installation code?February 17, 2018 at 17:33 #188950Kieran_SQModeratorHi,
With Restrict My Site disabled you could extend this code to suit your needs. This is for BuddyPress by default but you can change the conditions to suit your needs.
To open up your post type and any others you would need to use
is_singular( array( 'post-type-name', 'other-post-type-name' ) )
you can read more about that here https://codex.wordpress.org/Function_Reference/is_singularCOPY CODE// Redirect to register if logged out and page is BuddyPress function kleo_page_template_redirect() { //if not logged in and on a bp page except registration or activation if( ! is_user_logged_in() && ( ( ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) ) ) { wp_redirect( home_url( '/register/' ) ); exit(); } } add_action( 'template_redirect', 'kleo_page_template_redirect' );
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.