The next step is to create the Sidebar. We have already added its call in the code (in the footer.php
file), now we need to implement some code inside the sidebar.php
file. Let's go step by step.
First, we will add a div with the sidebar
ID as follows:
<div id="sidebar" style="display:none;"> <!-- #1 --> </div>
Note that the div
in the preceding code has style="display:none;"
. Again, we will do some DOM manipulation so that we can display its children inside Ext JS components. Inside #1
, which is inside the div, we will add some other divs, each one representing a widget on the Sidebar.
The first widget we will add to the Sidebar is the Categories list with their respective post count:
<div id="categoriesCont"> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> </div>