Bird
0
0

Given this code snippet in a WordPress theme's functions.php:

medium📝 component behavior Q13 of 15
Wordpress - Themes and Appearance
Given this code snippet in a WordPress theme's functions.php:
add_theme_support('custom-logo');

function display_logo() {
  the_custom_logo();
}
display_logo();
What will be the output on the site if no logo is set in the Customizer?
AThe site logo image will display a default placeholder
BAn error message will appear on the site
CThe site title text will automatically show instead
DNothing will display where the logo should be
Step-by-Step Solution
Solution:
  1. Step 1: Understand the_custom_logo() behavior

    If no logo is set, the_custom_logo() outputs nothing (no image or placeholder).
  2. Step 2: Check fallback behavior

    It does not show an error or fallback text automatically; the theme must handle that separately.
  3. Final Answer:

    Nothing will display where the logo should be -> Option D
  4. Quick Check:

    the_custom_logo() outputs nothing if no logo set [OK]
Quick Trick: No logo set means the_custom_logo() outputs nothing [OK]
Common Mistakes:
MISTAKES
  • Assuming a default image appears
  • Expecting automatic site title fallback
  • Thinking an error message shows up

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes