0
0
Wordpressframework~5 mins

Child themes and overrides in Wordpress - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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.
Which file is required to declare a child theme?
Astyle.css
Bindex.php
Cfunctions.php
Dreadme.txt
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.
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.
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.
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.