How do I enqueue the custom css?
-
Hey so I’m trying to enqueue custom CSS for bbPress v2.6.4 on the WP 5.4.1 clan website running a WP Twenty Twenty-child theme.
This is what my functions.php currently looks like
<?php /** * Child theme stylesheet einbinden in Abhängigkeit vom Original-Stylesheet */ add_action( 'wp_enqueue_scripts', 'child_theme_styles' ); function child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style')); wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/css/bbpress.css', array()); } ?>
And this is how my bbpress.css looks like.
#bbp-forum-info, #bbp-forum-topic-count, #bbp-forum-reply-count, #bbp-forum-freshness { color: #232323; } #bbpress-forums { background: transparent; clear: both; margin-bottom: 20px; overflow: hidden; font-size: 1.75rem; color: #232323; }
The changes I applied in the bbpress.css won’t update the bbpress CSS on the above mentioned site. So their must be something wrong with my functions.php but I can’t yet put my finger on it how to load it properly as I’m pretty new when it comes to WordPress. I wanna append these changes globally to all parts of bbPress forum.
Can someone tell me to if and what i need to specify inside the arrray() call for the bbpress.css to load properly? Or hint me towards what’s wrong here.
- You must be logged in to reply to this topic.