Forum Replies Created
-
Author
-
October 28, 2017 at 18:37 in reply to: code used to change “Create an Account” in the Login Modal has memory issue… #178207jackbeanParticipantNot marked as solutionjackbeanParticipant
Hi Kieran,
Thanks for the reply. Apologies for my late response as I just came back from a trip.
As to your point about read Changelog, I already did that. In fact, the reason I opened the ticket is because I saw in the Changelog that there is a “Small font-size fix for IE”, which is actually something I opened a support ticket on, and I had to add some codes into the Kleo Theme Quick Css. I would like to how to find the updated Kleo Parent file and replace the Kleo Child file, so that I don’t have duplicated codes/functions that may actually cause conflicts.
Secondarily and more importantly, I was wondering if the Parent Kleo update impacted some of the functionality of the existing website based on the Child Theme. Specifically, I added the following codes to my Kleo Child functions.php file. The codes are meant to re-direct all non-logged in users to the Register page if the non-logged in User tries to use any of the BuddyPress or bbPress pages.
COPY CODE/** * Redirect buddypress and bbpress pages to registration page for non-logged in Users */ 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() ) || is_bbpress() ) ) { wp_redirect( home_url( '/register/' ) ); exit(); } } add_action( 'template_redirect', 'kleo_page_template_redirect' );
I got this code from the Kleo support link here: https://seventhqueen.com/blog/code-snippets/restrict-guest-users-from-accessing-buddypress-or-bbpress-pages.html#comment-45
The code was working, but stopped working after the Kleo update.
Very strangely, now all BuddyPress pages (Members, Groups) for non-logged in user will go to the Member Levels page (instead of the Register page). I don’t know why that’s happening. Also, the bbpress page (“Forum”) is open unprotected, and non-logged in user can see the content.
Please let me what you think. Thanks very much as always!
JB
-
AuthorPosts