Bird
0
0

Which of the following is the correct way to include a custom header file named header-special.php in a WordPress theme template?

easy📝 Syntax Q12 of 15
Wordpress - Themes and Appearance
Which of the following is the correct way to include a custom header file named header-special.php in a WordPress theme template?
A<code>include('header-special.php');</code>
B<code>get_header('special');</code>
C<code>get_template_part('header-special');</code>
D<code>load_header('special');</code>
Step-by-Step Solution
Solution:
  1. Step 1: Recall how to load custom header files

    WordPress uses get_header('name') to load header-name.php.
  2. Step 2: Match the function to the file name

    For header-special.php, call get_header('special').
  3. Final Answer:

    get_header('special'); -> Option B
  4. Quick Check:

    Custom header call = B [OK]
Quick Trick: Use get_header('name') to load header-name.php files [OK]
Common Mistakes:
  • Using include() instead of get_header()
  • Confusing get_template_part() with get_header()
  • Using non-existent functions like load_header()

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes