Load additional scripts depending on post-type.
Additional files depending on the current screen will be loaded automatically. Possible screens can be:
- home
- search
- {post-type}
- {post-type}-archive
- {post-type}-single
The loaded files can be overridden by the child-theme. Just add the according file in the folder and wordpress will notice your "extension".
Imagine looking at the homepage. This file will be loaded automatically:
- inc/screen/home.php
For search results this file will be loaded:
- inc/screen/search.php
Imagine the single view for post-type "customer" is loaded. Those files will be loaded automatically:
- inc/screen/customer.php
- inc/screen/customer-single.php
Looking at an archive those files are loaded
- inc/screen/customer.php
- inc/screen/customer-archive.php
Imagine those files in the parent theme:
- parent/inc/screen/home.php
- parent/inc/screen/post-archive.php
If you like to replace one of these files or extend it's content then just place the same file in your child-theme:
- child/inc/screen/post-archive.php
From now on WordPress will notice your file first and use it prior to the one in the parent theme.
- Missing taxonomy logic.