This topic has 15 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #177266
     jackbean
    Participant

    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

    #177284
     Kieran_SQ
    Moderator

    Hi 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 required

    KLEO 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 files

    There 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 solution

    If 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.

    #177314
     jackbean
    Participant

    Hi 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

    #177370
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #178033
     jackbean
    Participant

    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

    #178040
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #178041
     jackbean
    Participant

    Hi 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

    #178145
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #178151
     jackbean
    Participant

    Hi 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

    #178152
     Kieran_SQ
    Moderator

    Hi,

    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 page

    Kieran.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If 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.

    #178159
     jackbean
    Participant

    Hi 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

    #178160
     Kieran_SQ
    Moderator

    I 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 solution

    If 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.

    #178168
     jackbean
    Participant

    Thank 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

    #178407
     Radu
    Moderator

    Hi,

    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_-functions

    Related 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
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #178653
     jackbean
    Participant

    Thank 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

    #178744
     Radu
    Moderator

    Hi,

    Ok, no problem

    Have a nice week and good luck with the project

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 16 posts - 1 through 16 (of 16 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?