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?✗ Incorrect
functions.php is used to add PHP code that extends or customizes the theme's behavior.
When is the
functions.php file loaded by WordPress?✗ Incorrect
WordPress loads functions.php on every page load if the theme is active, so the code runs site-wide.
Can
functions.php code run if you switch to a different theme?✗ Incorrect
functions.php belongs to a specific theme and only runs when that theme is active.
Which of these is NOT a good use for
functions.php?✗ Incorrect
CSS styles belong in style.css, not in functions.php.
How is
functions.php different from a plugin?✗ Incorrect
functions.php is theme-specific and only runs when that theme is active, unlike plugins.
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.