Template System

Essential part of the plugin are templates. Templates are here to just display the HTML structure. All business logic is processed outside from templates.

Plugin is defining custom templates for the archive pages as well. For example company post type has template archive-company.php in theme. But we want to define custom HTML template for it. So we created WordPress hook which defines workforce/templates/archive-company.php template. We have done some with the templates for the single version of post type like single-company.php.

Before starting overriding template please check the file structure inside workforce/templates plugin. You can see whole template strucuture. All files have proper names so you can easily guess their purpose. If you are looking for changing certain part of HTML, for example if you want to add CSS class, please use grep(Mac or Linux) to find proper template file.

You can overwrite templates in themes or child themes. Find the template which you want to overwrite and copy its content into clipboard. Then navigation into theme and create following folder templates which will be used for placing file content from previous step. Create the exactly same file with the filename of template which you want to override and paste the content from clipboard. If the overriden template is located inside another directory don't forget to create that folder. For example if you are going to override login.php create following structure yourtheme/templates/account/login.php.

results matching ""

    No results matching ""