Info for Child Theme functions.php file

  • dramajan

    #5625

    I want to remove the developer info from my footer. My understanding is that I can do this by inserting the following code into my child theme’s functions.php file:

    function graphene_remove_credit(){
    global $graphene_settings;
    $graphene_settings['disable_credit'] = true;
    }
    add_action( 'template_redirect', 'graphene_remove_credit' );

    My question is: does any other code need to be in the child theme functions.php file?

    I’ve tried creating the functions.php file, uploading it to: wp-content/themes/GrapheneChild (same location as style.css) and I just get error messages at the top of my page.

    Advice, please.

    Mod

    Kenneth John Odle

    #32361

    Put code in between backtick (

    Code:
    `

    ) characters. It’s usually located above the Tab key on your keyboard. I’ve corrected this for you.

    Quote:
    does any other code need to be in the child theme functions.php file?

    Yes, your functions file should start with <?php and end with ?>

    Make sure that you have no spaces before the opening tag and no spaces after the closing tag.

    dramajan

    #32362

    Got it! Thanks.

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

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