Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a folder called /theme and I created a file called example-theme.theme.inc inside of it with a function MYSUBTHEME_example_theme($variables). Where do I put the MYSUBTHEME_theme function to register it?
Comments
Comment #1
Adam S CreditAttribution: Adam S commentedIn the subtheme's template.php define the theme function.
In the subtheme's /theme folder create a file called
something.theme.inc
. Then place the theme function inside that file.For an example of use, in the subtheme's page.preprocess.inc file located in the preprocess folder work some magic by overriding a core theme's output.
** Sorry to clutter the issue queue **