Bird
0
0

Why is it recommended to use functions.php in a child theme instead of editing the parent theme's functions.php file?

hard📝 Conceptual Q10 of 15
Wordpress - Theme Structure and Basics
Why is it recommended to use functions.php in a child theme instead of editing the parent theme's functions.php file?
ABecause parent theme functions.php is read-only
BTo preserve customizations when the parent theme updates
CBecause child themes cannot have their own functions.php
DTo prevent WordPress from loading the parent theme
Step-by-Step Solution
Solution:
  1. Step 1: Understand theme update behavior

    Parent theme updates overwrite its files, including functions.php.
  2. Step 2: Recognize child theme benefits

    Using functions.php in child theme keeps custom code safe from parent updates.
  3. Final Answer:

    To preserve customizations when the parent theme updates -> Option B
  4. Quick Check:

    Child theme functions.php protects custom code from updates [OK]
Quick Trick: Use child theme functions.php to keep custom code safe [OK]
Common Mistakes:
  • Thinking child themes can't have functions.php
  • Believing parent functions.php is read-only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes