> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Advanced Level:  How to Add Navigation to Your Sidebar in WordPress

Besides using widgets, there are several ways to add **Pages, Archives** and even **Categories** into your WordPress blog. 

Below we try do modify such pages by adding relevant codes into our Themes _sidebar.php_ file. 


1. Login to your WordPress dashboard and click on **Appearance >> Editor**.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/97f08907-07b3-4db2-aeb4-001b6c631ce3.png)


2.  Locate _sidebar.php_ file on the right navigation bar under **Theme Files**.
![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/a6ae0eeb-45e1-4c1e-81f4-95ccbc43d441.png)


3. Once the file opens you will see the php code that governs the sidebar display and behavior. 

From here you will be able to add the code to populate the sidebar with navigation links for **Pages**, **Categories**, or **Archives**. 

Below are the code samples you would need to add to your sidebar.php file

1. **Pages**
```<?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>```

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/52340c9e-07d3-460b-9f4a-eb4a616d3f68.png)


2. **Categories **
```<?php _e('Categories:'); ?> <ul> <?php wp_list_cats(); ?> </ul>```
![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/5a1b14a8-98af-4f3c-ad3c-f753973b7aac.png)


3. **Archives**
```<?php _e('Archives:'); ?> <ul> <?php wp_get_archives('type=monthly'); ?> </ul>```

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/9b2d20b2-1676-4c0c-bbaa-025e0fb26ebb.png)


Remember to click on **Update File** button in order to save every changes you've made.

**Final note:**
Once you have performed the above steps, you can visit your site to see the additional navigation links you have added. You are able to adjust the formatting (font, etc) by adding inline custom CSS or adjusting your style.css file.