WordPress.org

Ready to get started?Download WordPress

Forums

Expound
[resolved] Should add_filter be in footer.php or style.css? (3 posts)

  1. kennethlim
    Member
    Posted 7 months ago #

    Konstantin,
    Thanks for your help with the footer change info. Should the code be added to the style.css or footer.php? I tried to add it to the footer.php in the child theme but ended up with a fatal error. Any advice would be appreciated!

    ________________________________________________________________________
    Hey there! Here's some code you can use in a child theme or a plugin to change the theme footer:

    add_filter( 'expound_credits_text', 'my_credits_text' );
    function my_credits_text( $text ) {
    return 'My custom footer text.';
    }

  2. kennethlim
    Member
    Posted 7 months ago #

    I figured it out.
    I added the codes to the footer.php file in the child theme.

  3. Konstantin Kovshenin
    Member
    Theme Author

    Posted 6 months ago #

    That's a wrong decision. As the message says, you should put that code in a child theme or a plugin, not your footer.php file. You can learn more about child themes here: http://codex.wordpress.org/Child_Themes

    Good luck!

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.