• Resolved wiegs015

    (@wiegs015)


    I’m sorry if someone already started a thread about this. But I’m new in wordpress theme development and confused.

    What are the things that should be in the functions.php? Because I started to learn from reading the twenty-elven theme and there are a lot of things that I don’t really understand.

    Thanks before

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    The functions.php is where you typically put code that is required or adds value to the theme. Or just have code that you want to ensure goes hand in hand with the theme.

    For example code that’s needed to setup additional widgets, custom backgrounds or header, or theme options.

    Most (probably all) of that code can be implemented via plugins. But by putting it in functions.php the author ensures that the code is available to be used by the theme all the time.

    Using that file is the same as using a plugin except that it’s only available (activated) when the theme is selected. Change the theme and that code is no longer available.

    Thread Starter wiegs015

    (@wiegs015)

    Thanks a lot. I have a better understanding now.

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

The topic ‘about functions.php’ is closed to new replies.