This is just a very quick set of recommendations based on our experiences using templates with Cwicly and WordPress. There may be some exceptions but these are a good starting point for most sites.
Tips:
- Set up your header and footer in the Themer > Template Parts tab
- You don’t have to create an individual template for each page unless you actually need one for that page (see guidelines below)
- There are 2 well-used ways to add the header and footer template parts to your templates:
a) add the template part directly into the templates via the + button when editing it (best if you have few templates and want the header/footer to display the same on every page that uses that template)
b) use the Cwicly Themer Fragments tab (best if you want more fine-grained control over which pages the header and footer display on for each template - you can use the visibility conditions for this)
Guidelines / best practices:
- Think of your page as having the content and your template creating the layout that content sits in (you position the main content via the Post Content block in the template)
- Create additional page templates only when your design requires a custom layout for a specific page or you have additional content separate from the main page content. If all of your pages have the same layout, you can simply use the default Pages template
- When creating page templates prefer to use the +Default to add the templates - only use Custom if you want to be able to select between different templates from the page itself via the template selector
- Also use Default templates for single item templates and archive templates when you need to work with custom post types and taxonomies
- I recommend always using Cwicly visibility conditions in the Themer for every template (with the exception of WooCommerce in some cases). This ensures there are no conflicts or strange behaviours and the correct template will always be used for each page
- Prefer to use the Index template for the blog archive page only and set the Visibility conditions for that template to show If Archive > Posts > All
Generally this should give you a good mixture of stability, reliability and allow you to achieve most types of site designs.