• in the new starter _s theme from automattic (for example), does the code in a file like tweaks.php or functions.php only run once when you go to the theme? or does it run through this code every time you go to a new page or post??

    trying to figure out how they do the multi-column layout design in the Able theme (I downloaded the theme code from wordpress.com) because a class is set depending on the number of sidebar widgets there are and there is also a full-width page template.

    Al

Viewing 3 replies - 1 through 3 (of 3 total)
  • There’s no “one size fits all” answer to this. It depends upon the functions that are in these files. Some may be called on every page, some may only run under specific situations.

    Thread Starter almcr

    (@almcr)

    ok interesting, where can I read some documentation on this??

    Al

    Again, because this is so very theme specific, you’re not going to find any specific documentation unless the theme developer has chosen to publish this level of documentation (highly unlikely). You could try looking through the scripts themselves to see if they contain any useful comments.

    You also might want to have a look at the action reference & filter reference documentation. I think those two would cover all of the scenarios where a function isn’t being called manually.

    HTH

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘tweaks.php, etc’ is closed to new replies.