InMotion Hosting Support Center

The sidebar of a website is traditionally used to place navigation links for visitors to find their way around a website. In Wordpress, there are three basic navigation types: Pages, Archives, and Categories. You may add these to your sidebar to help your visitors be able to find content on your site more easily. You can modify your sidebar file to add navigation to these content types. Below are the instructions on how to modify your sidebar to add navigation to your WordPress site.

  1. Log into your Wordpress Admin dashboard.
  2. Once logged into the Admin area, look to the left hand menu and click on the Appearance menu category. This will reveal several sub-options. Click on the Editor option to continue.
  3. You are now on the main Editor page for all php and css files for your theme. Look to the menu on the right-hand side, scroll down until you see the Sidebar option. Click on that link to open the sidebar.php file in the editor.
    select editor menu option
  4. 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

    <?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
    list pages code
    <?php _e('Categories:'); ?> <ul> <?php wp_list_cats(); ?> </ul>
    code to list categories
    <?php _e('Archives:'); ?> <ul> <?php wp_get_archives('type=monthly'); ?> </ul>
    code to add archives

  5. Insert your code into the appropriate spot in the file editor. After inserting the code, click on the Update File link to save you code. From there 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.
Continued Education in Course 204: Customizing your Wordpress Sidebar
You are viewing Section 2: How to add navigation to your sidebar in WordPress
Section 1: Adding Nested Links to your sidebar in Wordpress
Section 3: Adding Meta Data to your WordPress sidebar

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2017-07-31 5:40 am

Excellent post! This is really helpful to use my business site development. Great work.



n/a Points
2015-03-30 9:14 am

Thank you for this wonderful step by step tutorial. 


I finally managed how to move navigation to my sitebar. You can see live here on my website

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!