Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can't figure out how to override parent css

Viewing 7 replies - 1 through 7 (of 7 total)

  • Henry
    Member

    @henrywright-1

    Have you tried doing what the article suggests? i.e putting this in your theme’s functions.php file:

    if ( !function_exists( 'bp_dtheme_enqueue_styles' ) ) :
        function bp_dtheme_enqueue_styles() {}
    endif;

    poetrybyjade
    Participant

    @poetrybyjade

    Hi Henry! Thanks for taking some time with this.

    I have tried that, but have limited knowledge of php, so the whole thing crashed. I copied the function.php file from buddypress, put it in the child theme’s folder, and then inserted the code after the initial <?php. It crashed. So then I cut it, and put it at the end, it just displayed the text, so then I cut it and put it right before the final ?>

    I’m doing something wrong, just can’t figure it out.


    Henry
    Member

    @henrywright-1

    You need to start with an empty functions.php file in your child theme folder.

    e.g.

    <?php
    
    // put whatever you want here
    
    ?>

    poetrybyjade
    Participant

    @poetrybyjade

    So the code in the file would be this?

    <?php

    if ( !function_exists( ‘bp_dtheme_enqueue_styles’ ) ) :
    function bp_dtheme_enqueue_styles() {}
    endif;

    ?>


    Henry
    Member

    @henrywright-1

    @poetrybyjade yes, following the instructions in the article, that is exactly what I would do. Did it work?


    poetrybyjade
    Participant

    @poetrybyjade

    Hmm, it doesn’t seem to be working.

    I added more code to my style.css file but the parent is still overriding.

    I don’t know where to go from here. I might just push the brakes on this for a bit. Thank you so much for your help. I really appreciate you taking the time!


    Henry
    Member

    @henrywright-1

    @poetrybyjade no problem. Might be worth trying again at some point though. I just tested and it works for me.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can't figure out how to override parent css’ is closed to new replies.
Skip to toolbar