0
0
Wordpressframework~10 mins

Header, footer, and sidebar templates in Wordpress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to include the header template in a WordPress theme.

Wordpress
<?php [1](); ?>
Drag options to blanks, or click blank then click option'
Aload_header
Binclude_header
Cheader_include
Dget_header
Attempts:
3 left
💡 Hint
Common Mistakes
Using include_header instead of get_header
Trying to include header.php manually with include()
2fill in blank
medium

Complete the code to include the footer template in a WordPress theme.

Wordpress
<?php [1](); ?>
Drag options to blanks, or click blank then click option'
Aget_footer
Bfooter_load
Cinclude_footer
Dload_footer
Attempts:
3 left
💡 Hint
Common Mistakes
Using include_footer instead of get_footer
Trying to load footer manually with include()
3fill in blank
hard

Fix the error in the code to include the sidebar template correctly.

Wordpress
<?php [1](); ?>
Drag options to blanks, or click blank then click option'
Aget_sidebar
Bload_sidebar
Cinclude_sidebar
Dsidebar_load
Attempts:
3 left
💡 Hint
Common Mistakes
Using load_sidebar or include_sidebar which are not WordPress functions
Trying to include sidebar manually with include()
4fill in blank
hard

Fill both blanks to create a custom sidebar template named 'custom'.

Wordpress
<?php [1]('[2]'); ?>
Drag options to blanks, or click blank then click option'
Aget_sidebar
Bget_footer
Ccustom
Dsidebar
Attempts:
3 left
💡 Hint
Common Mistakes
Using get_footer instead of get_sidebar
Using 'sidebar' instead of 'custom' for the template name
5fill in blank
hard

Fill all three blanks to include header, sidebar, and footer templates in order.

Wordpress
<?php [1](); ?>
<?php [2](); ?>
<?php [3](); ?>
Drag options to blanks, or click blank then click option'
Aget_header
Bget_sidebar
Cget_footer
Dload_template
Attempts:
3 left
💡 Hint
Common Mistakes
Using load_template which is not a direct template loader
Mixing up the order of header, sidebar, and footer