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

    Pages
    <?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
    list pages code
    Categories
    <?php _e('Categories:'); ?> <ul> <?php wp_list_cats(); ?> </ul>
    code to list categories
    Archives
    <?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.
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

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

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

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: support@InMotionHosting.com
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!