Forum Replies Created
-
I’ve setup 2 copies of the site locally to do a Before & After comparison. The attached image is a side by side comparison of Chrome’s Inspector when a link in the navbar is selected. https://i.imgur.com/2p6IU1l.png
BEFORE – BP Version 1.7.2 (Everything looks fine, but BP needs to be updated)
AFTER – BP Version 2.1.2 (Upon updating to this version, custom templates are not showing. After adding theme support for BP to functions file, custom templates load properly but the custom styling for BuddyPress navbar is lost).
Spent quite some time trying to figure this out but can’t get to the bottom of it. Hopefully, an experienced set of eyes can spot the issue.
Thanks for your help.
@djpaul @r-a-y Brilliant! I added theme support for BuddyPress and it worked 🙂 Thank you both so much for your help.
The only thing is, now that the template is loading properly, for some reason, the BuddyPress nav and subnav bar (which was looking as it should before) has now lost its styling. Is there something that needs to be done to get the theme’s custom styling back? I tried adding this
wp_dequeue_style( 'buddypress' );
to the same function but it didn’t work.
@r-a-y “may I ask what URL you are attempting to load …” this is the URL i see in the browser – http://www.domain.dev/users/username/dashboard/“If this is a non-BuddyPress page …” as far as i can tell, it appears to be a BuddyPress page.
Hi Paul @djpaul.
#1 Yes, you’re right. If it’s a custom template that loads ok with BP 1.7.2 all the way up to 2.0.3, and only has an issue when updating to BP 2.1, is it safe to assume that it’s not anything in the custom template’s code that’s causing the problem? If not, i can dig into it and share anything that’ll help to solve this.
#2 “it doesn’t mean the templates were built with *that* version” – do you think it’s a strong possibility the code in the custom template may be culprit? I just took a quick look and it seems to be quite standard.
add_theme_support( ‘buddypress’ ) is only in these files:
> wp-content\plugins\buddypress\bp-core\bp-core-theme-compatibility.php:
> wp-content\plugins\buddypress\bp-themes\bp-default\functions.php:#3 “compare where its looking for a template vs. where the template actually is.” – The strange thing is that it works with BP 2.0.3 and only ‘breaks’ upon update to 2.1, and the template is sitting in the same place (child theme’s root) all the time. Appreciate any suggestions if you have them, as i’m out of ideas as a novice tinkerer.
After rolling back to 1.7 and gradually updating each version, it appears it’s the update to 2.1 that’s the issue, as the templates are still loading fine with BP 2.0.3
Digging deeper, it seems that it’s the /plugins/buddypress/bp-core folder which causes the problem
Couldn’t track down the cause looking for clues in the changelog https://codex.buddypress.org/releases/version-2-1/
This line is a potential but i couldn’t understand the info from r8820 – “In bp_core_load_template(), only use locate_template for older bp-default themes (r8820)”