Skip to:
Content
Pages
Categories
Search
Top
Bottom

Child theme + custom header + functions.php


  • bazookaman
    Member

    @bazookaman

    I am trying to create a custom header size for the default buddypress theme. However, the tutorial i found only shows how to change the default theme itself. i would like to change it using a child theme. I changed the default header size in functions.php file and the style sheet. However, since I cannot name the file functions.php in the child theme, how do I get it to override the size settings in the default functions.php?

    I’m not even sure I’m asking this right.

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

  • @mercime
    Keymaster

    @mercime

    You can have your own functions.php file in a child theme. Just make sure that the new function you’ll be adding is not the same as the ones already in functions.php of bp-default parent theme.


    bazookaman
    Member

    @bazookaman

    The tutorial I read about child themes here: https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/ says you cannot have a functions.php file in the child theme b/c it conflicts with the real functions.php file. So it says to rename it. To your second point, that is exactly what i want to do. I WANT to override the default functions.php file b/c I want to change the default header size. But since the default header size DOES exist in the default functions file you are saying I cannot override it with a child theme?


    pcwriter
    Participant

    @pcwriter

    @bazookaman

    https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/ says:

    “If you create a blank functions.php file in your child theme, the parent theme functions.php will still be loaded. This will allow you to inherit existing functions, but also add your own. You must make sure you give your child theme functions a unique name, otherwise they will clash with the parent.”

    In other words, you CAN create a functions.php file in your child-theme, but the functions IN that file must have unique names.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child theme + custom header + functions.php’ is closed to new replies.
Skip to toolbar