Articles on: WordPress

How to Add Meta Data on Your WordPress Sidebar

The sidebar of a website, although traditionally used for navigation links and ads, can be used for any data you would like to place there. The most common use in Wordpress is to display other posts links, archives, and categories for further navigation into the site. You can, however, use the sidebar to put anything you want, known as meta data. This requires no special function calls and needs only basic HTML and CSS. The instructions below demonstrate how you can add this meta data to your WordPress sidebar.


Login to your WordPress Dashboard and click on Appearance >> Editor.


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.


This opens the sidebar.php file into an on-screen editor where you can edit the code and add anything you want. As stated, you can add anything you want, so with this example, we will simply add a paragraph about the site, which in this case is about dog training.

<p class="aboutsite">Wanna buy dog food? Want to potty train your dog? Come & Join us! This site is dedicated to those who love dogs and dog training.</p>





After entering your data, click on the Update File button to save the new changes to the sidebar.php file. The new information will now display on the site. Below is a sample of how the code above displays on the sidebar.

Updated on: 17/01/2019

Was this article helpful?

Share your feedback

Cancel

Thank you!