Timeline for Where do I find the functions triggered within a hook?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 18, 2016 at 8:56 | comment | added | Dave Romsey | Storefront is probably gong to be one of the more well organized and documented themes you'll run across. There really is no standard for organization, but the usage of an include/includes/inc directory which contains files with template hooks and template functions is commonplace. Searching for hooks and callbacks really is the way to go. @Mark Kaplun made a good point about dynamic hooks, which were not used in this case, but are definitely something to be mindful of. | |
Sep 18, 2016 at 8:50 | comment | added | MeltingDog | Thanks again! So it just seems like a bit of guess work then? Trying to guess where the theme developer has put the elements I need. Surely there's a practice or formula people follow? | |
Sep 18, 2016 at 8:48 | vote | accept | MeltingDog | ||
Sep 18, 2016 at 8:47 | comment | added | Dave Romsey |
Sure! I don't think it's over-coded; it's flexible! These functions can be overridden in a child theme (the parent theme should never be modified directly). Also, these functions can be unhooked via remove_action() and re-added via child themes or plugins. Storefront has recently be rewritten, and although I have not used it in production, the source looks great to me.
|
|
Sep 18, 2016 at 8:43 | comment | added | MeltingDog | Thanks. Am I right in assuming this template is "over-coded"? Everything is a function which I assume allows for easy backend customisation for non-coders. | |
Sep 18, 2016 at 8:27 | history | answered | Dave Romsey | CC BY-SA 3.0 |