How to
This is a list of typical things we need to add/edit/adjust for everty project
Custom Post types
- Duplicate the cpt template file /includes/cpt/template-cpt-book.php and change the prefix of the file name to the id of your new cpt.
- Go to /includes/cpt/custom-post-types.php and add a the filename to the array.
- New cpt articles will use single.php as the template file. Single.php will check if the article is a cpt and try to load the custom template from /components/template_part/content-single-cpt_id.php and fallback to content-single.php if it does not excist. Nice ha?
Note! Remember to change the name of the function that adds a custom title in template-cpt-book.php.<?php inc('template_part', 'content-single', null, get_post_type()); ?>
Custom menu
Add a new menu in setup() -> lib/init.php