BioShip uses an extended file hierarchy so you can easily override any of the Core Theme Files, Javascript and CSS Stylesheets by copying the existing files to your Child Theme and modifying them.
You can also override any Page Templates, Content Templates, Sidebar Templates etc. or create new ones for Custom Post Types or Post Formats etc. (see the Template Hierarchy Guide for further details on those.)BioShip File Hierarchy
The file hierarchy will search for the file in this order and use the first matching file it finds:
- the Child Theme subdirectories (if relevant)
- the main Child Theme directory (ie. 'Stylesheet' directory)
- the Parent Theme subdirectories (if relevant)
- then main Parent Theme directory (ie. 'Template' directory)
CSS Stylesheets
/wp-content/themes/bioship/styles/eg. copy /bioship/styles/stylesheet.css to /child-theme/styles/stylesheet.css
(or if you prefer, you can also use /css/ or /assets/css/ instead, eg. /child-theme/css/stylesheet.css)
[Note: custom.css will be auto-loaded if found in either child or parent theme.]
Javascripts
/wp-content/themes/bioship/javascripts/eg. copy /bioship/javascripts/scriptname.js to /child-theme/javascripts/scriptname.js
(or if you prefer, you can also use /js/ or /assets/js/ instead, eg. /child-theme/js/scriptname.js)
[Note: custom.js will be auto-loaded if found in either child or parent theme.]
Images
/wp-content/themes/bioship/images/eg. copy /bioship/image/image.png to /child-theme/image/image.png
(or if you prefer, you can also use /img/ or /assets/img/ instead, eg. /child-theme/img/image.png)
[Note: gravatar.png will be used for default Gravatar if found in either child or parent theme.]
Core Theme File Hierarchy
The File Hierarchy also allows you to override Core Theme Files, though in most cases this would be unnecessary, as generally speaking you would leave these alone for Parent Theme updates and modify individual functions instead.
All the core theme functions have been made pluggable (overrideable) - with minor exceptions (see below.) (In other words each function declaration is wrapped in conditional function_exists checks to make this possible.) So to override any function, simply place a modified copy of it in your Child Theme's functions.php file, As WordPress intentionally loads this file before the Parent Theme's functions.php, the modified function will be loaded instead of the default Parent Theme (Framework) function. (see Child Themes on the WordPress Codex.)(Note: although that is the preffered method, you may still use the File Hierarchy for development overrides however. For example, if you have found and fixed a bug in the Parent Theme skin.php or grid.php. As these files do not contain pluggable functions, you can put a modified copy of any of them in your Child Theme instead and report the bug for the next BioShip update, then recheck those fixes when the update comes out.)Core Theme Files
/wp-content/themes/bioshipTheme Setup Files | ||
functions.php | Theme Setup and Loader | |
options.php | Theme Options and Fonts | |
hooks.php | Layout Hooks and Labels | [Definitions with Value Filter: skeleton_theme_hooks] |
compat.php | Theme Backwards Compatibility | |
Core Layer Files | ||
skull.php | Theme Helpers and Head Setup | |
skeleton.php | Skeleton Page Templating Functions | |
muscle.php | Muscle Extended Theme Functions | |
skin.php | Skin Dynamic CSS Styles Output | [standalone, functions not pluggable] |
grid.php | Grid System Dynamic CSS Output | [standalone, functions not pluggable] |
Admin Files | ||
admin/admin.php | Admin-only Functions | |
admin/customizer.php | Customizer Integration | |
admin/tracer.php | Theme Function Debug Tracer | |
admin/docs.php | Documentation Generator |
Default Template Files
(see Template Hierarchy Guide for much more detailed information.)Base Templates | |
header.php | Default Header Template |
index.php | Default Index Template |
loop-index.php | Default Loop Template |
footer.php | Default Footer Template |
Template Directories | |
/content/ | Content Templates |
/content/format/ | Post Format Templates |
/sidebar/ | Sidebar Templates |
/templates/ | Third Party Templates |
Library Hierarchy
While the File Hierarchy also works for included libraries, if you want to use it for modifying a library, you will need to copy the entire library directory and subdirectories to your Child Theme to do so. This is because it will find the library loader file path and the library will load files relative to that.
Library Directories | ||
/includes/ | Default Includes | |
/includes/titan/ | Titan Framework | |
/includes/options/ | Options Framework | |
/includes/kirki/ | Kirki Library | |
/includes/hybrid2/ | Hybrid Core 2 | |
/includes/hybrid3/ | Hybrid Core 3 | |
/includes/hybrid-hook/ | Hybrid Hook | |
/includes/foundation5/ | Foundation 5 | |
/includes/foundation6/ | Foundation 6 |
← Previous: Conditional Value Filters | Back to Documentation Index |