0
0
Wordpressframework~5 mins

Functions.php role in Wordpress - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of the functions.php file in a WordPress theme?
The functions.php file lets you add custom PHP code to your WordPress theme. It acts like a plugin inside your theme to add features or change how WordPress works.
Click to reveal answer
beginner
Can you use functions.php to add new features to your WordPress site without editing core files?
Yes! functions.php is the safe place to add new features or change behavior without touching WordPress core files. This keeps your site update-safe.
Click to reveal answer
intermediate
How does WordPress load the functions.php file?
WordPress automatically loads the functions.php file from the active theme folder on every page load, so your custom code runs everywhere on your site.
Click to reveal answer
intermediate
Is functions.php the same as a plugin?
No, but it works similarly. functions.php is part of your theme and only works when that theme is active. Plugins work independently and stay active even if you change themes.
Click to reveal answer
beginner
What kind of code can you put inside functions.php?
You can add PHP functions, hooks (actions and filters), custom shortcodes, and other code that changes or extends WordPress features.
Click to reveal answer
What does the functions.php file in a WordPress theme do?
AStores theme style rules
BAdds custom PHP code to extend theme functionality
CContains the main HTML structure of the site
DManages WordPress database connections
When is the functions.php file loaded by WordPress?
AOn every page load when the theme is active
BOnly during theme installation
COnly when the admin dashboard is open
DWhen a plugin is activated
Can functions.php code run if you switch to a different theme?
AYes, it runs regardless of the active theme
BOnly if the new theme imports it
CNo, it only runs with its own theme active
DOnly if you copy it to the new theme
Which of these is NOT a good use for functions.php?
AWriting CSS styles for the theme
BChanging WordPress default behavior with hooks
CAdding custom shortcodes
DRegistering new widget areas
How is functions.php different from a plugin?
AIt is stored outside the WordPress folder
BIt can be activated or deactivated separately
CIt cannot add new features
DIt only works with its theme active
Explain the role of the functions.php file in a WordPress theme and how it helps customize a site.
Think of it as a mini plugin inside your theme.
You got /4 concepts.
    Describe the difference between functions.php and a WordPress plugin.
    Consider when each runs and how they are managed.
    You got /4 concepts.