August 2017
Beginner
412 pages
10h 30m
English
Now we can move along to adding WordPress-generated content in the sidebar. Essentially, this part of our work is pretty simple. All we have to do is include some WordPress functions that will handle displaying various bits of dynamic content. In this case, it is the categories, tags, and archives.
Starting at the top, include the following piece of code in the sidebar area:
<div id="secondary" class="widget-area" role="complementary"> <?php if(is_active_sidebar('sidebar-1')) dynamic_sidebar('sidebar-1' ); ?></div><!-- #secondary -->
This code takes care of displaying whatever widgets have been assigned to that particular widget area. Placing widgets in the sidebar of your HTML structure is the easiest and probably the most usable ...
Read now
Unlock full access