In this section, we will work on the categories widget shown on the left-hand side of the following screenshot. Right now, we just have a static HTML unordered list:
Adding the category widget and search option
Adding a function to use the category widget
In order to use widgets, first we have to include the initialization code in our functions.php file:
<?php
// Theme Support
function theme_setup(){
// Featured Image Support
add_theme_support('post-thumbnails');
set_post_thumbnail_size(900, 600);
// Post Format Support
add_theme_support('post-formats', array('gallery'));
}
add_action('after_setup_theme', 'theme_setup');