-
Author
-
October 21, 2017 at 02:12 #177266jackbeanParticipant
Hello,
I recently updated the Kleo theme, and I would like to know what actually happens to the Child Theme that is active.
Meaning, when the “parent” Kleo theme is updated, does the active Child Theme also get updated?
I guess the only exception would be the custom .css and .php codes that will remain untouched by the update?
Please confirm my understanding.
Thank you,
JB
October 21, 2017 at 17:24 #177284Kieran_SQModeratorHi JB,
Thanks for reaching out about parent / child themes and how they work. I’ll try my best to explain below.
KLEO
– Updates are made to this, the parent theme, and not the KLEO Child
– Holds all of the code needed and requiredKLEO Child
– Empty theme that you can add modified copies of content from KLEO that will always override the original content
– Update safe way to edit core theme filesThere are exceptions to the above mentioned. A theme may undergo a major revision in which the code base changes considerably. If that happened then it is likely that the Child theme would cause errors on the front-end. If this happens then a new copy of the file should be move from parent to child and edited to suit.
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.
October 22, 2017 at 02:55 #177314jackbeanParticipantHi Kieran,
thank you for the reply to enhance my understanding of the Kleo theme, which is, in my view, an excellent product!
If I understand it correctly, since my website is built based on the active Child theme, then technically any enhancement to the Parent theme would not benefit the Child theme? So as long as my website is functioning, there is not reason to keep updating the Parent theme?
Is my understanding correct?
Thank you!
JB
October 22, 2017 at 16:00 #177370Kieran_SQModeratorHi,
When updates roll out you should check this Changelog https://archived.seventhqueen.com/kleo/article/changelog to see any core changes to any parts of KLEO that you have in your KLEO Child theme, if there is major updates you should move the new template file into the child theme and copy across your changes. For minor updates you will not need to do this, minor updates account for the majority of updates.
You should continue to update the theme as it continues to support new iterations of WordPress, WooCommerce and BuddyPress etc, if you stop updating the theme and continue updating plugins you’re likely to run into issues. You should always update plugins and themes where possible for new features, bug fixes and resolutions to security issues.
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.
October 26, 2017 at 21:32 #178033jackbeanParticipantHi 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
October 26, 2017 at 23:51 #178040Kieran_SQModeratorHi,
No worries, hope you enjoyed your travels.
It looks like we’re not currently posting about which files are changed with each item, I will forward this to the development team as a potential feature to be added to the support site. In the meantime you could open a new ticket about any changes you were concerned with and the ticket will be assigned to a developer to let you know what files have changed. The minor CSS fix you referenced will be in the core CSS file which I would expect you not to have in your KLEO Child theme.
With regards to the snippet above, everything looks fine with it, and I tested locally with success, is it possible this has stopped working after a plugin update? If you like you can share admin credentials for your site in a private reply so I can take a look for you.
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.
October 27, 2017 at 01:19 #178041jackbeanParticipantHi Kieran,
Thanks for looking into the issue for me.
I have to ask my boss about sharing admin rights as he’s very worried about site securities.
But just based on what your experience, what do you think could have led to the situation where all the pages are working ok for logged in users. But for non-logged in visitors, all BuddyPress pages are redirected to the Member Levels page?
I also tried a plugin called “BP Registration Option” that is supposed to help with “Only registered or approved members can view BuddyPress/bbPress pages (Private Network).” But it did not do any thing.
You can see how the website is now behaving if you goto:
– https://www.prohrweb.org/members/And the page will be automatically redirected to:
– https://www.prohrweb.org/membership-account/membership-levels/Thanks!!
JB
October 27, 2017 at 18:24 #178145Kieran_SQModeratorHi,
It looks like you have you have Paid Memberships Pro installed but without access I cannot see what might be going wrong. It should be BuddyPress registration > Paid Memberships Pro, but for some reason it is trying to force you to pick a level and register through Paid Memberships Pro.
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.
October 27, 2017 at 19:03 #178151jackbeanParticipantHi Kieran,
I know man! this is very strange….
I’m stuck on this issue big time… the even more strange part is that Buddypress pages (blog, members, groups, activity) and bbpress page (forum) are not appearing to be recognized as associated with Buddypress or bbpress. The reason I say this is that I have tried multiple plugins used to restrict access to BDpress and BBpress pages, but none of the plugin made any difference. Do you have a thought on this strange behavior?
Also, in the code below… where does it say that pages I want to restrict are only Buddypress pages?
———————————————————————-
/**
* 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’ );——————–
Thank you!!
JB
October 27, 2017 at 19:12 #178152Kieran_SQModeratorHi,
I doubt any plugin would work whilst you had that snippet in functions.php – they’d likely start causing constant loops. Worth trying a plugin again without the above code.
is_user_logged_in() – Is the user logged in or not
bp_is_blog_page() – does the page contain BuddyPress content
bp_is_activation_page() – is the page set as activation page
bp_is_register_page() – is the page set as register pageKieran.
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.
October 27, 2017 at 21:05 #178159jackbeanParticipantHi Kieran,
So I did several tests with plugins… and the problem is with the Paid Membership Pro plugin. If I deactivate that plugin, everything works (the plugins, the codes in function.php), but as soon I activate the Paid Membership Pro plugin, then nothing works.
I checked all the settings for Paid Membership Pro plugin, but cannot see anything that would help.
Any thoughts would be great.
Thank you!!
JB
October 27, 2017 at 21:09 #178160Kieran_SQModeratorI will ask one of our developers to look into this for you, but they will need admin credentials to debug any issues you’re having. Please consider adding new and temporary admin credentials for your site so we can assist you better.
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.
October 27, 2017 at 23:13 #178168jackbeanParticipantThank you Kieran! Really appreciate your help as always.
I will have to talk to the boss about setting up the admin credentials when he’s in the office Monday.
In the mean time, I thought that what I need to do is really simple in the idea. If we forget about the complexities with BDpress and BBpress, all I need to do is just to simply redirect non-logged in Users when they click on a few specific pages, so I wrote the codes below:
===========================
function page_redirect_trial()
{
if( ! is_user_logged_in() && (is_page(‘faqs’) || is_page(‘blog’) || is_page(‘members’) || is_page(‘groups’) || is_page(‘activity’)))
{
wp_redirect( home_url( ‘/register/’ ) );
exit();
}
}
add_action( ‘template_redirect’, ‘page_redirect_trial’ );==============
Unfortunately the code is not working for me, I don’t know if the reason has to do with “Paid Membership Pro” or not. What do you think?
thanks!!
JB
October 30, 2017 at 17:57 #178407RaduModeratorHi,
To can check if the user it’s on any buddypress page you will have to use the buddypress conditional tags
see here : https://codex.buddypress.org/developer/template-tag-reference/#is_-functionsRelated to your example code
instead of is_page(‘members’) you will have to use bp_is_members_component()
instead of is_page(‘groups’) will have to use : bp_is_group_component()
instead of is_page(‘activity’) you will have to use bp_is_activity_component()see the bp codex link for additional functions
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 1, 2017 at 22:02 #178653jackbeanParticipantThank you Radu and Kieran,
Thanks for looking into the issue for me.
After trying various things and considering different factors, I thought the best solution to this problem (and for other reasons) is just not use Paid Membership Pro (PMPro) plugin but go with another membership plugin. PMPro is just too much trouble to deal with.
Very much appreciate all your help and suggestions as always.
JB
November 2, 2017 at 16:57 #178744RaduModeratorHi,
Ok, no problem
Have a nice week and good luck with the project
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.