Complete the code to set the site title in the WordPress theme header.
<?php bloginfo('[1]'); ?>
The bloginfo('name') function outputs the site title set in WordPress settings.
Complete the code to include the WordPress header template in your theme.
<?php [1]('header'); ?>
get_footer() loads the footer, not the header.wp_head() is a hook, not a template loader.The get_header() function loads the header.php template part in a WordPress theme.
Fix the error in the WordPress loop to display post titles.
<?php if (have_posts()) : while ([1]()) : the_post(); ?> <h2><?php the_title(); ?></h2> <?php endwhile; endif; ?>
the_post() in the loop condition causes errors.get_post() does not check for posts in the loop.The loop condition must call have_posts() to check if there are posts to show.
Fill both blanks to create a WordPress menu location and display it.
<?php register_nav_menus(array('[1]' => '[2]')); ?> <?php wp_nav_menu(array('theme_location' => '[1]')); ?>
Registering a menu location uses a slug like 'primary' and a description like 'Main Menu'. Then wp_nav_menu displays the menu by that slug.
Fill all three blanks to enqueue a stylesheet properly in WordPress.
<?php function theme_styles() {
wp_enqueue_style('[1]', get_template_directory_uri() . '/[2]', array(), '[3]');
}
add_action('wp_enqueue_scripts', 'theme_styles');The handle is a unique name like 'theme-style'. The path is usually 'style.css'. The version helps browsers know when to reload the file.