Skip to:
Content
Pages
Categories
Search
Top
Bottom

Child theme css overrides bbPress css


  • laalpert1
    Participant

    @laalpert1

    Hello –

    I’ve created a copy of bbpress.css in my child theme’s folder, but edits to this file don’t seem to be taking precedence over the child theme’s css file. Possibly something to do with the enqueue function in the child theme’s functions file, but I don’t know enough about that to check that.

    I’m using WP version 4.6.1, bbPress version 2.5.11 and a custom child theme. The site’s forum page is here: http://www.amersa.org/forums.

    The child theme functions file includes this function:

    if (!function_exists(‘inspiry_enqueue_child_styles’)) {
    function inspiry_enqueue_child_styles(){
    if ( !is_admin() ) {
    // dequeue and deregister parent default css
    wp_dequeue_style( ‘parent-default’ );
    wp_deregister_style( ‘parent-default’ );

    // dequeue parent custom css
    wp_dequeue_style( ‘parent-custom’ );

    // parent default css
    wp_enqueue_style( ‘parent-default’, get_template_directory_uri().’/style.css’ );

    // parent custom css
    wp_enqueue_style( ‘parent-custom’ );

    // child default css
    wp_enqueue_style(‘child-default’, get_stylesheet_uri(), array(‘parent-default’), ‘1.1’, ‘all’ );

    // child custom css
    wp_enqueue_style(‘child-custom’, get_stylesheet_directory_uri() . ‘/child-custom.css’, array(‘child-default’), ‘1.1’, ‘all’ );

    }
    }
    }

    Is this what’s causing the issue? Thanks.

  • You must be logged in to reply to this topic.
Skip to toolbar