Sage workflow

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:

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!

3 Likes

We take a two-forked approach.

Information Architecture code β€” stuff that’s theme-independent like custom post types, custom taxonomies, image settings, etc β€” we put into a custom plugin and place it in mu-plugins.

Virtually all other functions go in the Sober Controller.

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.