Roots Discourse

Sage workflow


#1

Hello guys, first thx very much for this modern theme. i am working in my new theme and i have any qestions.

  • For each function for my theme i should create a plugin? example, i have a custom post. I should create a plugin fo this cpt function?

  • What file is the equivalent of function.php?

Thanks so much for reading :slight_smile:


#2

Equivalent files to functions.php are in your-theme/app: https://github.com/roots/sage/tree/master/app

This is the functions.php file: https://github.com/roots/sage/blob/master/resources/functions.php

These files are added to functions.php in this array: https://github.com/roots/sage/blob/master/resources/functions.php#L50-L61

Here is the info in the docs: https://roots.io/sage/docs/theme-functionality/

And the theme structure here: https://roots.io/sage/docs/theme-configuration-and-setup/

Greetings!