WordPress.org

Ready to get started?Download WordPress

Forums

tweaks.php, etc (4 posts)

  1. almcr
    Member
    Posted 1 year ago #

    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

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  3. almcr
    Member
    Posted 1 year ago #

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

    Al

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.