Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is a child theme in WordPress?
A child theme is a theme that inherits the look and functionality of another theme called the parent theme. It allows you to make changes without altering the parent theme's files.
Click to reveal answer
beginner
Why use a child theme instead of editing the parent theme directly?
Using a child theme keeps your changes safe when the parent theme updates. If you edit the parent theme directly, updates will overwrite your changes.
Click to reveal answer
intermediate
How do you override a template file in a child theme?
Copy the template file from the parent theme into the child theme folder, keeping the same folder structure, then edit the copied file in the child theme.
Click to reveal answer
beginner
What file must a child theme have at minimum?
A child theme must have a style.css file with a special header that defines it as a child theme and points to the parent theme.
Click to reveal answer
intermediate
How can you enqueue styles properly in a child theme?
Use wp_enqueue_scripts action in the child theme's functions.php to load the parent theme's stylesheet first, then the child theme's stylesheet.
Click to reveal answer
What happens if you update a parent theme after editing its files directly?
AWordPress creates a backup of your changes.
BYour changes will be saved automatically.
CYour changes will be lost.
DThe update will be blocked.
✗ Incorrect
Direct edits to the parent theme are overwritten when the theme updates, so your changes will be lost.
Which file is required to declare a child theme?
Astyle.css
Bindex.php
Cfunctions.php
Dreadme.txt
✗ Incorrect
The style.css file with a special header declares the child theme and links it to the parent theme.
How do you override a parent theme's template file in a child theme?
AUse a plugin to override the file.
BCreate a new file with a different name in the child theme.
CEdit the parent theme file directly.
DCopy the file to the child theme with the same path and edit it.
✗ Incorrect
Copying the template file to the child theme with the same folder structure overrides the parent template.
What is the best way to load styles in a child theme?
AEnqueue styles in functions.php using wp_enqueue_scripts.
BUse @import in style.css.
CLink stylesheets directly in header.php.
DAdd styles inline in the footer.
✗ Incorrect
Enqueuing styles in functions.php is the recommended and efficient way to load styles in WordPress.
Which of these is NOT a benefit of using a child theme?
AAbility to customize without losing changes.
BFaster website loading by default.
CSafe updates of parent theme.
DEasy to revert to original parent theme.
✗ Incorrect
Using a child theme does not automatically make the website load faster.
Explain what a child theme is and why it is useful in WordPress.
Think about how you keep your work safe when the original changes.
You got /3 concepts.
Describe the steps to override a template file using a child theme.
Imagine copying a recipe to your own notebook to change it.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of creating a child theme in WordPress?
easy
A. To customize a theme without modifying the original parent theme files
B. To create a completely new theme from scratch
C. To delete the parent theme safely
D. To speed up the website by disabling the parent theme
Solution
Step 1: Understand child theme purpose
A child theme allows changes without touching the original theme files, preserving updates.
Step 2: Compare options
Options A, C, and D describe unrelated or incorrect uses of child themes.
Final Answer:
To customize a theme without modifying the original parent theme files -> Option A
Quick Check:
Child theme purpose = Customize safely [OK]
Hint: Child themes keep parent files safe from changes [OK]
Common Mistakes:
Thinking child themes replace parent themes
Believing child themes delete parent themes
Assuming child themes speed up the site
2. Which line must be included in a child theme's style.css to link it to its parent theme?
easy
A. Template: parent-theme-folder-name
B. Parent: parent-theme-folder-name
C. Theme: parent-theme-folder-name
D. Import: parent-theme-folder-name
Solution
Step 1: Identify correct header line
The child theme's style.css must have a Template line naming the parent theme folder.
Step 2: Eliminate wrong options
Options A, B, and D use incorrect keywords not recognized by WordPress.
Final Answer:
Template: parent-theme-folder-name -> Option A
Quick Check:
Child theme links parent with Template line [OK]
Hint: Look for 'Template' line in style.css header [OK]
Common Mistakes:
Using 'Parent' instead of 'Template'
Confusing 'Theme' or 'Import' as header lines
Omitting the Template line entirely
3. Given this functions.php snippet in a child theme, what will happen?
D. Both parent and child styles load correctly, child overrides parent
Solution
Step 1: Analyze enqueue order
The parent style is enqueued first, then the child style with parent as dependency.
Step 2: Understand effect on styles
This ensures parent styles load first, then child styles override them if needed.
Final Answer:
Both parent and child styles load correctly, child overrides parent -> Option D
Quick Check:
Proper enqueue order = parent then child [OK]
Hint: Child style depends on parent style in enqueue [OK]
Common Mistakes:
Forgetting to enqueue parent style
Loading child style before parent
Not setting dependency array
4. You created a child theme but your custom CSS changes are not showing. Which of these is the most likely cause?
medium
A. You added the child theme folder inside the parent theme folder
B. You activated the parent theme instead of the child theme
C. You used @import in functions.php instead of style.css
D. You forgot to add the Template line in style.css
Solution
Step 1: Check theme activation
If the parent theme is active, child theme changes won't apply.
Step 2: Review other options
Missing Template line causes child theme not to work, but usually disables child theme; folder placement is less critical; @import usage is unrelated to activation.
Final Answer:
You activated the parent theme instead of the child theme -> Option B
Quick Check:
Active theme must be child for overrides [OK]
Hint: Always activate the child theme, not the parent [OK]
Common Mistakes:
Not activating the child theme
Misplacing child theme folder
Confusing @import usage location
5. You want to override a parent theme's header.php file in your child theme. Which is the correct way to do this?
hard
A. Create a new file named header-child.php in the child theme
B. Edit the parent theme's header.php directly
C. Copy header.php from parent theme to child theme folder and modify it there
D. Add a header.php file in child theme but leave it empty
Solution
Step 1: Understand override mechanism
WordPress loads template files from child theme first if they exist.
Step 2: Apply correct override method
Copying header.php to child theme and editing it overrides the parent's version.