Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Is there a Wordpress "functions.php" equivalent in antimatter theme?

Started by Muut Archive 10 years ago · 6 replies · 440 views
10 years ago

I'd like to enable pinch zooming in antimatter and read in a post that I can edit the templates/partials/base.html.twig file viewport settings to do so. However when antimatter is updated, will I lose these edits? In wordpress there's a functions.php file for most themes that is a safe place to put custom functions and such, is there something like this for antimatter?

10 years ago

Do not directly modify a theme. functions.php in WP as far as I know is a place to put custom PHP code for the theme, but it's going to be overwritten if you update the theme. Same works in Grav. If you update Antimatter, it will overwrite your changes.

As @bleutzinn mentioned, create a child theme and put your edits there.

10 years ago

Thanks, that's what I'm looking for! I'm really digging the simplicity of the system and the way I'm not forced into a box.

10 years ago

Nice, the Them Inheritance page was exactly what I needed and now the child theme is working perfectly to remove the zoom blocking.

10 years ago

Question- I've lost the menu dropdowns. I recall that antimatter had a theme option to turn those on. How would I get my child theme to not override the antimatter dropdown setting?

10 years ago

Never mind- adding

dropdown:
enabled: false

to the mytheme.yaml file turned it back on.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2947 9 years ago
Archive · by Muut Archive, 9 years ago
3 1118 9 years ago