In this video, learn how to optimize your code to include stylesheets to protect you against potential problems.
- Right now, we have perfectly adequate code … that loads both CSS files. … But, we can actually improve the quality of our code … and learn a bit about WordPress and PHP in the process. … So let's look at how to do that. … The first thing I want to do, is I want to force WordPress … to load the parent theme's CSS file first. … So what we can do here is I'll go to the end of this line, … I'll add a space and then a comma, … and I'm going to type in array, … followed by a parentheses, followed by a single quote, … and then type in parent-style. … Whenever I type array, think of a list. … I'm giving WordPress a list of data. … In this case, it's only a list with one item, … but some functions in PHP require that list format. … So I'm giving WordPress a list with the names of files … that it should load before loading my file. … The name here has to match the name of the file … when we included it in WordPress, so right here. … Right now, WordPress must load this parent-style first, … which is exactly what we want. …
- Setting up your development environment and editor
- Picking a parent theme
- Creating a child theme
- Including style sheets
- Creating and modifying styles
- Modifying functions
- Hooking functions
- Creating and modifying template files
- Adding menus and functionality
- Migrating theme files to a live WordPress site
Skill Level Intermediate
Using the exercise files1m 13s
1. Building on a Solid Foundation
2. Creating a Child Theme
3. Child Themes and CSS
4. Working with Function Files
5. Working with Template Files
6. Add New Functionality
7. Wrapping Up
Next steps1m 4s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.