Category Archives: Theme essentials

GavernWP essentials – the most important features and options described in the easy and short form.

Main front-end features

Themes based on GavernWP framework have support for many useful solutions and technologies. The most important ones are:

  • Custom page styles – they extend functionality of standard subpages.
  • Typography – an advanced list of elements gives a possibility to enhance posts about various add ons.
  • Social API – it allows to add buttons for sharing posts in social network services very easily.
  • Open Graph – it allows to specify the way in which content shared on Facebook will be visible.
  • Threaded comments – they allow to make discussions under posts in a clear way.
  • Branding – it simplifies setting key elements of a website connected with its name or brand.
  • Color styles – thanks to color styles, it is possible to create many various color and stylistic versions of a theme.

 

Theme CSS

Theme’s CSS code is divided into a few files, loaded in order specified. All these files are in css catalog. You have to remember that order of these files is very important and its change may cause unpredictable changes of theme’s look because of using moving from general styling to detailed styling in CSS code.

The list of CSS files used in a theme is presented below (order according to recommended order of loading these files):

  1. normalize.css – CSS code unifying page’s elements styling in all browsers
  2. template.css – the most important CSS file responsible for page’s layout styling , basic typography, widget styling, etc.
  3. wp.css – CSS rules which are responsible for WordPress elements styling, e.g. a comments form , comments themselves or posts elements.
  4. shortcodes.*.css (optional) – a group of CSS files responsible for typography elements styling inserting to posts with Shortcodes.
  5. stuff.css – it includes styling of additional theme’s elements sucha s breadcrumbs or font-size switcher.
  6. wp.extensions.css – CSS rules connected with styling of standard widgets available with WordPress.
  7. extensions.css (optional) – a CSS file which you have to add yourself in the case when you want to style additional widgets. In the case of small changes in widget styling, we recommend to use override.css file instead of this file.
  8. tablet.css – CSS rules used while displaying a page on tablet devices.
  9. mobile.css – CSS rules used while displaying  a page on smartfon devices.
  10. ie*.css – a file or a group of CSS files used for correcting page’s look in an Internet Explorer browser.
  11. style*.css – a file or a group of CSS files used for changing coloring or general style of a theme – they are loaded automatically by a mechanism responsible for theme’s coloring.
  12. error.css – CSS rules used while displaying a error page.
  13. rtl.css –  CSS rules for language written in a Right-To-Left (RTL) direction.
  14. font-awesome.css – The full suite of Retina ready pictographic icons, e.g. for widget titles.
  15. override.css (optional) – you may add your own rules in this file which will overwrite existing rules in previous files – a perfect solution for theme modification without modifying the remaining CSS files.

Additionally, CSS code used in a theme itself, you will also find in a templates catalog where there are CSS files loaded on chosen styles of subpages, e.g. needed for correct work of a gallery.

Theme structure

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

  • header.php – this file includes starting page’s structure i.e. a head section and the whole headline with elements such as: logo, main menu, etc.
  • before.php – there are all widget positions included in this file which are before page’s main content.
  • after.php – this file is an equivalent of before.php file but with one difference – it includes widget positions which are after 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 and elements below.

The above files with a file given from a main catalog, create a basic structure of each page. The remaining elements are generated by additional files or functions. The majority of of such files can be found in layouts catalog; e.g. files with names content.post.*.php, include constituents of each post. . Using these files allowed to restrict the amount of code in theme’s main files and simplify its modification as change e.g. an entry footer requires modification of one or two files only.

Functions used for generating additional information displayed in posts are in gavern/helpers/helpers.layout.fragments.php file.