An introduction to what themes are, how they work, and the kinds of themes that are out there. Also, how to modify themes in the Customizer, with Plugins, and via child themes.
- GPL is an open source license - It causes the code covered by the license to be free: to be used, modified, and redistributed - “Free as in freedom, not as in beer” - Free to do what you want, not necessarily zero dollars - WordPress is covered by the GPL, your theme should be too
Control: - how your site looks - position of elements - colors - fonts - etc - the layout of your pages - whether you can use widgets - and where - how featured images display
any theme types - Build on & customise existing themes - Change styles - Change layout of a page, or pages - Change text (e.g., copyright in footer) - Compartmentalise edits to their own directory - More portable - Keep edits update-proof
& index.php - Each part of site breaks up into a new file - Post & page content files can be automatically detected in /template- parts - Child theme only needs style.css
create: - Directory in wp-content/themes - any name is fine - style.css file - functions.php file (optional) - Can use FTP or a plugin - e.g., Orbisius Child Theme Creator wordpress.org/plugins/orbisius-child-theme-creator/
theme are saved according to theme’s folder name (eg “twentysixteen”) - You can have different settings per child theme - So options don’t port between parent & child theme automatically - Not all option themes can export/import their options - You might not be able to quickly switch to a child theme and import options you’ve already created in the parent theme
Name: Twenty Sixteen Child Theme URI: http://example.com/twenty-sixteen-child/ Description: Twenty Sixteen Child Theme Author: John Doe Author URI: http://example.com Template: twentysixteen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twenty-sixteen-child */ the crucial bit
You’ll need to know, or at least recognise HTML, CSS & PHP HTML: <h1>My main page heading</h1> CSS: h1 { text-align:center; } PHP: <?php the_title(); ?>
quicker to customise (or a lot quicker if you do it often) - Familiar code-base - Easy to switch between child themes of the same theme framework - Lots of existing child themes - Popular ones make finding code, tutorials, and developers easier