[buddypress-trac] [BuddyPress] #3389: Enqueueing CSS of bp-default breaks child theme layouts

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Jul 26 19:44:48 UTC 2011

#3389: Enqueueing CSS of bp-default breaks child theme layouts
 Reporter:  mercime  |       Owner:
     Type:  defect   |      Status:  new
 Priority:  normal   |   Milestone:  Awaiting Review
Component:  Theme    |     Version:  1.3
 Severity:  normal   |  Resolution:
 Keywords:           |
Changes (by r-a-y):

 * component:  Core => Theme


 @mercime - Old skool! ;)

 How are you enqueueing your stylesheet?  Are you trying to outright remove
 the default theme's stylesheet?  If so, you should be able to remove the
 default one using `wp_deregister_style` during the `after_setup_theme`

 Or you might need to use the `wp_deregister_style` inside the
 `wp_print_styles` action.  Action firing!


 function my_print_styles() {
      wp_deregister_style( 'bp-default-main' );

      // enqueue your style now
      wp_enqueue_style( 'my-bp', get_stylesheet_directory_uri() .
 '/style.css', array(), BP_VERSION );
 add_action( 'wp_print_styles', 'my_print_styles', 20 );

 Also, make sure you don't have a hardcoded stylesheet in your theme's

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3389#comment:2>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list