BP Nouveau styles not loading in child theme when logged out
I have BP v.9.1.1 installed under WP 5.8.2 and the site in progress is using a subdomain with its directory at the root. The directory is named as per the subdomain (i.e. subdomain.domain.tld). Unfortunately, I’m unable to share the URL.
I’ve been wrestling with this issue for a while now. When logged in as the admin and viewing the Members Directory, the bp-nouveau-css styles (…/buddypress.min.css?ver=9.1.1) load just fine but they won’t load when logged out. This is happening specifically with an Avada child theme. I have reached out to Avada support but I’m not holding my breath for a solution from them.
I cloned the site and began by activating the Twenty Twenty One. Like the original site, bp-nouveau-css loaded just fine when logged in or out. This was also the case for Twenty Twenty One child or the Avada parent themes. However, activating the Avada child theme prevents that stylesheet from loading.
In my Avada child theme, I’ve only added the buddypress/members/ directories so I could make some tweaks to the listings and profile pages. The child theme’s style.css relies on the Nouveau template CSS in the BP plugin directory. With its styles missing, the page falls apart.
I also have some custom functions in plugins/bp-custom.php but none of those deal with stylesheets.
I’ve also tried placing the CSS folder from /buddypress/bp-templates/bp-nouveau/ in /avada-child-theme/ as a test. When logged in, bp-nouveau-css loaded from the child theme. When logged out, other BP styles were loaded from the plugin directory, not the child theme, and it still refused to load bp-nouveau-css.
Can I add a function somewhere to enqueue the styles I need since the child theme won’t do it on its own?
I’d actually like to add a function to only load BP’s CSS and JS where necessary since only a couple of pages use BP. I’ve found this SERT Media article but comments suggest the code won’t work with Nouveau.
I’d greatly appreciate any help with this issue. Cheers.
- You must be logged in to reply to this topic.