Hello,
I’d like to make a number of changes to the BuddyPress stylesheet style-buddypress.css, I don’t see it being enqueued via functions.php so have no clue how it’s getting added.
If I copy the style-buddypress.css over to my child theme folder and make adjustments, this file won’t be loaded.
Please advise how are we supposed to use/adjust style-buddypress.css from within the child theme?
** all style changes and customizations must come from the child theme folder, I am not and won’t be adding anything to the “custom css” within the theme options.
Thank you,
Richard
Hello Calin,
I needed to make adjustments to the css for BuddyPress related page elements. All of them. For example, changing the background colour of the buttons that are hoovered over. A simple example:
#buddypress a.button:hover span,
a.bp-title-button:hover span,
#buddypress ul.button-nav li a:hover span,
#buddypress a.button:focus span,
a.bp-title-button:focus span,
#buddypress ul.button-nav li a:focus span,
#buddypress a.button:active span,
a.bp-title-button:active span,
#buddypress ul.button-nav li a:active span {
background-color: #a11ff2;
}
I have way more edits and changes that are needed. I could target this directly from the child theme css file. But this isn’t the correct way to do this according to BuddyPress documentation.
BuddyPress requests that a separate companion CSS file be offered, style-buddypress.css is the file Newspaper is using. However, it’s not being enqueued via functions.php, so it must be somewhere else in the theme’s additional plugin that it’s being setup. Having an edited version in the child-theme doesn’t work.
If the mechanism behind enqueuing this style-buddypress.css file can be understood, it’s probably easier to de-enqueue and re-enqueue for the child theme file instead.
For me, this isn’t as much of an issue anymore as I need to be patching changes that aren’t compatible with the child-theme model you use. i.e. modifying the mobile menu header files. Your documentation on child-theme supported overrides only works for td-standard, not td-composer.
td-composer/legacy/Newspaper/parts/menu-mobile.php
So I’ll copy over the style-buddypres.css into the parent with my edited version as part of the patching. There’s no rush for a response now on my behalf.
Knowing the correct way of doing this would be helpful for others in the future and maybe added to the child-theme documentation.
Thank you and have a nice day.
Hi,
If you want to use a child theme for the BouddyPress, then as you said you need to use there guide https://codex.buddypress.org/legacy/theme-development/the-bp-default-theme/building-a-buddypress-child-theme/
Also the child theme from our guide can be use for the files from standard pack, but it will also work for files from tagDiv Composer, not all of theme, but most of them, like on the standard pack. I will make some more investigations for how to set the style-buddypress.css in child theme and come back when I will have good results.
Thank you!
Hi Calin,
Thank you for that update. That page you’ve linked is more informative than the other Buddypress pages on style support I’d seen. I am quite curious as to your findings.
I’ve tried the following with respect to the td-composer plugin and the child-theme.
child-theme root = /
/menu-mobile.php
/parts/menu-mobile.php
/legacy/Newspaper/parts/menu-mobile.php
/td-composer/legacy/Newspaper/parts/menu-mobile.php
Unfortunately, none of these has worked for me. So it’s likely an unsupported file.
Btw I think it’s great that tagDiv offers this form of child-theme support, very forward-thinking considering how complex your theme is and its use of additional plugins.
/td-composer/legacy/Newspaper/parts/
This is the folder I am finding I need to modify files, like:
logged.php
menu-mobile.php
login.php
Thanks!
Richard
Hi,
The thing is that there are more files that need to be edited to change the path files, for example if you edited this file wp-content/themes/Newspaper-child/parts/header/td-login-modal.php and you are using the top bar style 1 then you must change the path from this https://prnt.sc/10a4q66 in this https://i.imgur.com/fzr9ZWk.png when you edit some files, those can be set with a specific path in other files and that is way are not apply, because the path need to be changed -> https://i.imgur.com/WmWDCI7.png, now in above example, you can set the top bar file in child theme and so on.
There is not quite easy to use a child theme.
Hope this will help!
Hello Calin,
Sorry for the delayed response.
Well, writing over the parent style-buddypress.css file didn’t work, so I tracked down the enqueued name for it. style-buddypress.css is enqueued as ‘td-theme-buddypress’.
So it’s very easy to take it over, buy dequeuing it then renenquing it in child functions.php file.
function renenquing_buddypress_styles() {
wp_dequeue_style( 'td-theme-buddypress' );
wp_enqueue_style('td-theme-buddypress', get_stylesheet_uri() . '/style-buddypress.css');
}
add_action('wp_enqueue_scripts', 'renenquing_buddypress_styles');
Thank you for your assistance.