Learn about the GavernWP WordPress framework’s theme structure

Last Updated:
Category:
Gavern Framework

Every theme’s subpage in GavernWP is created based upon one file from the theme’s main catalog, e.g. single.php, and at least four additional files from the layouts catalog:

  • header.php – This file includes the starting page’s structure i.e., a head section and the whole headline with elements such as: logo, main menu, etc.
  • before.php – This file defines all the widget positions which occur before the page’s main content.
  • after.php – This file defines all the widget positions which occur following the page’s main content.
  • footer.php – Similarly to header.php file, it includes a starting page’s structure as footer.php includes the ending page’s structure, i.e. a footer and elements below.
  • responsive_css.php – This file defines additional responsive rules e.g. media queries not included in mobile.css and tablet.css
  • social.php – This file is responsible for creating social buttons, which can be used on theme posts or pages.

The above-mentioned files with a file selected from the main catalog work together to establish a basic structure for each page. The remaining elements are generated by additional files or functions. The majority of such files can be found in the layouts catalog (files with such names as “content.post.*.php” include constituents of each post. Use of these files reduces the amount of code required in the theme’s main files and simplifies changes. For example, a footer entry only requires modification to one or two files.

Functions used to generate additional information displayed in posts are located in the in gavern/helpers/helpers.layout.fragments.php file.

Learn about the GavernWP WordPress framework’s theme structure 5.005 (100.00%) 1 vote

This article was first published

Villa Belluci - View our NEW theme
×

Tutorials & tips delivered regularly

Expand your purchase with regular tutorials and tips to making your site better, direct to your email.