So you've been playing around with WordPress. You feel like you've really gotten the hang it. However, you're starting to run into limitations with how much you can customize your site. The next step toward creating an entirely custom WordPress site is to create a child theme. A child theme is a theme which is based on another theme (the "parent theme"), and can override and/or add to the look and functionality of the parent theme.
This session is for: people who have made an HTML/CSS website, used WordPress, and run into customization limitations
8. What is a child theme?
A Child Theme is a theme that overrides and adds
elements to another theme (the “Parent” theme)
without touching any of the Parent theme’s code.
When the parent theme is updated, your changes
will be preserved.
9. why?
1. If you update your theme, you won’t lose
your changes
2. You have greater control over your theme,
without having to create one from scratch
3. It’s a great way to learn the basics of
WordPress theming
35. Overriding a file
• Copy header.php from twentythirteen
• Paste into our child theme
• Open file in text editor
• Copy lines from <div id="navbar" class=“navbar">
to </div><!-- #navbar —>
• Move to above <a class="home-link" …
• Save & view your site
Goal: Move Main Navigation to above the page title a file
36. Page Templates
• You can set pages to use different templates if your theme or
child theme has other page templates available
no templates available
37.
38. Page with no sidebar
• Copy page.php from twentythirteen
• Paste into our child theme *
• Rename to template-no-sidebar.php
• Add Template Name: No Sidebar to the header comment *
• Open in text editor, remove <?php get_sidebar(); ?>
• View a page- if there’s no visible sidebar, add widgets to Secondary Widget
Area.
• Edit the page, choose template from the dropdown.
• Update page & view new template.
41. Themes are…
• style.css for appearance
• templates (php files) for layout/HTML/displaying your content
• functions.php for any functionality in your theme
42. functions.php
• Theme setup function
• Define any navigation menus
• add_theme_support
• post formats, featured images, custom header, custom
background, and more
• Set up widget areas
• $content_width