WordPress Sidebars - GreenGeeks https://www.greengeeks.com/tutorials/category/wordpress-sidebars/ How-to Website Tutorials Mon, 30 Jan 2023 16:47:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.1 How to Use Content Aware to Add Sidebars to WordPress Themes https://www.greengeeks.com/tutorials/content-aware-sidebars-wordpress/ https://www.greengeeks.com/tutorials/content-aware-sidebars-wordpress/#respond Fri, 21 May 2021 14:00:48 +0000 https://www.greengeeks.com/tutorials/?post_type=ht_kb&p=41604 Most WordPress themes come with an option to add sidebars to pages. You can add them to the left or right side, and even choose …

How to Use Content Aware to Add Sidebars to WordPress Themes Read More »

The post How to Use Content Aware to Add Sidebars to WordPress Themes appeared first on GreenGeeks.

]]>
Most WordPress themes come with an option to add sidebars to pages. You can add them to the left or right side, and even choose what pages they show on. However, what if you wanted to customize a particular sidebar and show it in a specific place for a certain time? Well, now you can do that with Content Aware.

Sidebars in WordPress offer unique ways to display extra content that you want your site users to have access to. The main issue with these sidebars is that while you can show them on certain pages, you can’t make unique ones to go on other pages unless you have a plugin.

Today, I am going to show you how you can use a plug called Content Aware to create customized sidebars for your WordPress website and show them where you want when you want.

What Are Sidebars in WordPress?

When we talk about WordPress sidebars, we are talking about a “widget-area” that is used by WordPress that will allow you to display and publish extra information that is not really part of the main content on the page. Usually, when a site developer uses a sidebar, they are including things that are not necessarily connected to a blog post but still relevant to the site.

For example, a travel blog could show a weather widget in the sidebar. This way, travelers would know what to expect when traveling in terms of weather.

This could include things like social media buttons, email subscription lists, important articles, and advertisements. Of course, this varies from site to site, but the idea is to display the same content on every page so that no matter where a user is, they can see the info.

However, there are some instances where you need to build a specific sidebar to show on a specific page.

Taking it even further, you want the sidebar to only show for a specific amount of time. This is because maybe you are running advertisements, or you may want to show content-specific information based on posts or pages that a user is viewing.

For instance, showing a Black Friday banner makes sense if you’re planning holiday sales or information.

The plugin we are going to use today allows you to customize those sidebar elements. Let’s take a look at it and see what all it has to offer.

Unlimited Custom Sidebars – Content Aware Sidebars

Content Aware plugin

Unlimited Custom Sidebars – Content Aware Sidebars is a sidebar plugin that allows you to create an unlimited amount of custom sidebars that you can display around your website.

Building these helps with all sorts of things. You can boost conversion rates, optimize SEO, upsell certain products, and display a variety of useful information.

If you are looking for a way to help grow your site, then Content Aware Sidebars can help you with that. it comes with a ton of features and display options. These include:

  • Posts
  • Pages
  • Custom Post Types
  • Tags
  • Categories
  • Custom Taxonomies
  • Page Templates
  • Blog Page
  • Author Archives
  • Front Page
  • Search Results
  • bbPress Profiles and Forum Topics
  • Pods Pages

Note: There is a pro version of this plugin available. It does provide quite a few more display and customizable options. If you feel your site needs access to this, then go ahead and give it a look. The tutorial below is based on the free version of the plugin.

Add a Custom Sidebar to WordPress

Step 1: Install and Activate the Plugin

Before you can start building custom WordPress sidebars, you first need to install and activate the Content Aware plugin. You can do this right from the WordPress admin dashboard.

Install and activate content aware

Simply go to the Plugins page and use the available search filled. Search the plugin by name and when you see it pop up, install and activate it right from there.

Step 2: Click on Add New Sidebar

Now that the plugin is installed and activated, you can go directly to adding a new sidebar. There are no settings or configurations to be made before you begin. You complete everything individually, during the process of setting up in WordPress.

Click on Content Aware > Add New, located on the left side menu of the dashboard.

Click content aware then add new

You will see these are options that are now available because you installed the plugin.

Step 3: Add a Sidebar Name and Display Conditions

A new sidebar editor will come up. Here is where you will build your first custom sidebar. Add a name for your sidebar and then select the display conditions you want to be attached.

Add name and condition

Note: You can also click on one of the “Quick Add” buttons to add your sidebar display condition without using the drop-down menu.

Step 4: Create Sidebar Actions

After you set a sidebar name and display condition, click on the “Action” tab. From here, you want to set the actions for this particular sidebar that you are building.

Add actions

Use the dropdown to add the actions you want.

Step 5: Design Your Sidebar Widget Area

Now comes the design part of the process. When you click on the “Design” tab, you will be given several different design options. Go through all of these and design the sidebar the way you feel is best for your particular setup.

Design tab

Note: If you leave the settings at default, then the styling will be inherited from the target sidebar.

Step 6: Set a Schedule for the Sidebar

The Content Aware plugin allows you to set a schedule for the sidebar. You can choose when you want to activate or deactivate it.

Set a schedule

Step 7: Set Final Options

Last but not least, click on the “Options” tab and set the order of the sidebar you want.

Final options

Once you do this, click on the “Create” button to create the sidebar. That’s it! The sidebar will now display based on the conditions you chose during the building process.

Handling the Widget Area

Content Aware comes with a built-in widget area as well. To utilize it and display your custom sidebar that way, you need to go to the widgets page and place it where you want.

Click on Appearance > Widgets, on the left menu are of the dashboard.

Click on appearance then widgets

Once on the widgets page, you will see that there is a “Sidebar” widget added that has the name of the sidebar you built.

Content Sidebar widget

Now that you know how to build and display custom WordPress sidebars, you should be able to expand and build your site more rapidly. This is just one of many different types of plugins that can really make a difference when it comes to customization.

Final Thoughts 

You want to have a website that is unique from other sites. It doesn’t really matter what niche you are in, you have to do things to separate your site from other sites. One great way to do this is to build customized sidebars that allow you to display the information you want on the pages and posts you want.

The Content Aware plugin makes this entire process simple and fast. Once configured, you can build and display an unlimited amount of WordPress sidebars on your website.

Have you tried building sidebars another way? Is there another custom sidebar plugin you prefer over this one?

The post How to Use Content Aware to Add Sidebars to WordPress Themes appeared first on GreenGeeks.

]]>
https://www.greengeeks.com/tutorials/content-aware-sidebars-wordpress/feed/ 0
How to Use Simple Page Sidebars and When You Should https://www.greengeeks.com/tutorials/simple-page-sidebars/ https://www.greengeeks.com/tutorials/simple-page-sidebars/#respond Thu, 21 May 2020 15:53:00 +0000 https://www.greengeeks.com/tutorials/?post_type=ht_kb&p=34788 Like many things, website themes or layouts go through periods of popularity and then fall out of favor. Websites as single column layouts because that’s …

How to Use Simple Page Sidebars and When You Should Read More »

The post How to Use Simple Page Sidebars and When You Should appeared first on GreenGeeks.

]]>
Like many things, website themes or layouts go through periods of popularity and then fall out of favor. Websites as single column layouts because that’s all HTML, and our browsers, could do.

As the technology progressed, we moved on to frames, sidebars, and multiple columns. Finally, the mobile internet became a driving force, so now the tide is turning back to single columns.

As you’ve no doubt noticed, default WordPress themes have been single-column layouts for several years now. But a lot of us still prefer a column layout, or in WordPress, sidebars. It’s still the best way to present information that doesn’t readily lend itself to a single column design.

Today, we’re going to talk about a plugin called Simple Page Sidebars that gives you the ability to use custom sidebars. So rather than using the same sidebar on every page, you can have different sidebars for different pages. If you’re a sidebar fan, that’s an exciting possibility, and it has a lot of uses and benefits.

Installing the Simple Page Sidebars Plugin

Log in to your WordPress admin panel.

In the left column navigation, mouse over the “Plugins” link and click the “Add New” link.

mouse over the "Plugins" link and click the "Add New" link

In the “Search plugins…” box, enter, “Simple Page Sidebars.”

search for the WordPress Simple Page Sidebars plugin

When you find the plugin, click the “Install Now” button.

click to install the WordPress Simple Page Sidebars plugin

Now the plugin is installed, but it has to be activated before you can use it.

Click the “Activate” button.

click to activate the WordPress Simple Page Sidebars plugin

That’s all there is to it. Now let’s put the plugin to work.

About the Themes and Editors We’ll Be Using

I always use WordPress-developed themes for tutorials, even though they tend to be a bit generic. But with a WordPress theme, we know that everything should work correctly. And we avoid complications or conflicts that can pop up when using third-party themes.

To demonstrate this plugin, I’ll use the WordPress Twenty Sixteen theme. That’s an older design, so I wouldn’t usually use it. But it’s the most recent to use for a sidebar in a column layout.

I’ll also be using the WordPress Gutenberg block editor since that’s the default editor in every new WordPress installation. But I know that many people still use the “classic” WordPress editor, so we’ll cover that as well.

Finally, I used WordPress Theme Unit Test data from WP Test to populate the blog with posts, pages, and comments.

Setting Up Simple Page Sidebars

Setting up and using the sidebar plugin isn’t exactly intuitive, but it’s easy to use once you know where to go.

The first thing you have to do is define a default sidebar.

In the left column navigation, mouse over the “Settings” link and click the “Reading” link.

click the "Reading" link

Scroll down to the “Default Sidebar” section and choose a default sidebar from the drop-down. So in the Twenty Sixteen theme, I’ll select “Sidebar.”

select default sidebar from the drop-down

Then click the “Save Changes” button.

click the "Save Changes" button

Setting the default sidebar doesn’t change anything on your blog. The sidebar that’s always been on every page will still be there. The plugin uses the setting to know which sidebar to display when no custom sidebar is used.

Some themes will not use a default sidebar. If your theme uses different sidebars for different page templates, this plugin may not work for you. You would have to add code via a child theme to use it, and I wouldn’t recommend doing that.

Creating a New Custom Sidebar

The custom sidebars that you create can be used in multiple areas, but they are created on a specific page. I warned you this wasn’t going to be intuitive. 😉

Open a page in the WordPress editor. As I mentioned, I’m using Gutenberg. I’ll show you how to do this in the classic editor in a minute.

In the “Document” column on the right side of the editor, scroll down to “Sidebar.”

Under “Current sidebar,” click the “Enter New” link.

click the "Enter New" link

Enter a name for your custom sidebar in the “Current sidebar” field.

Click the “Update” button.

enter custom sidebar name and click update button

In the “Sidebar saved” dialog box that opens, click the “Update widgets now” link.

click the "Update widgets now" link

On the widgets page, you’ll see a section for your new custom sidebar.

new custom sidebar widgetnew custom sidebar widget

Now you can drag widgets into the new sidebar.

drag widgets into the new sidebar

Don’t forget to click the “Save” button for every widget that you add.

Now, if we go to our sample page, we’ll see the custom sidebar at work.

custom sidebar on page

And of course, the default sidebar is still displayed on every other page.

default sidebar on page

For any additional custom sidebars you want to create, just repeat these steps.

Creating a New Custom Sidebar in the “Classic” WordPress Editor

Not a big difference in the classic WordPress editor. When you open a page in the editor, you’ll see that the “Sidebar” section is still in the column on the right side. Under “Current sidebar,” click the “Enter New” link and go through the same process as we did above.

click the "Enter New" link in classic editor

How to Add a Custom Sidebar to Multiple WordPress Pages

Okay, you know that you can repeat the steps above to create as many custom sidebars as you’d like. But what if you want to use one custom sidebar on multiple pages?

Nothing to it.

In the left column navigation of your WordPress admin panel, click the “Pages” link to open your pages list.

You’ll see in the list that there’s a new “Sidebar” column.

Find the custom sidebar that you want to add to other pages and click the link.

click the "Sidebar" link

A page will open that lists all of your site pages. Click the box for any page where you’d like to add the custom sidebar.

Click the “Update Sidebar” button to save your changes.

click the "Update Sidebar" button

It’s worth noting that if you check the box for a page that already uses a custom sidebar, like this:

selecting a page that already uses a custom sidebar

You will replace the old custom sidebar with the one that you’re currently configuring. That happens because a page can only use one custom sidebar. It’s essential to be aware of that because replacing a custom sidebar that only appears on one page will delete the sidebar.

For example, in the image above, I’ve checked the box for “Sample Page (sample page sidebar).” The “sample page sidebar” custom sidebar that I’m replacing is only used on the sample page. So when I check that box and click the “Update Sidebar” button, the “sample page sidebar” custom sidebar will be deleted.

This is an excellent sidebar plugin for WordPress, but that’s something to watch out for. You cannot retrieve a deleted custom sidebar.

What Happens if You Uninstall the Simple Page Sidebars Plugin

If you uninstall the plugin, pages that used custom sidebars will revert to the using the theme’s default sidebar. There aren’t any other effects or leftover code to clean up.

Now You Know How to Create a Sidebar in WordPress

For your WordPress pages, anyway. It would be cool if this also worked on posts, but it is called Simple Page Sidebars, after all. And for a simple sidebar generator, it can’t be beaten.

Adding custom sidebars on a per post basis would likely make a plugin the opposite of simple. The ability to create a different sidebar for each page on your site, and simply, is a beautiful thing.

I mentioned that it’s beneficial to use more than one sidebar across an entire site. Aside from allowing you to custom-tailor the information on each page, changing up sidebars helps with Google.

When information appears repetitively on every page of your site, Google may ignore it. In the worst-case scenario, your website can be penalized for duplicating content.

That’s not a problem for most of the widgets in WordPress sidebars. Things like recent posts or comments, calendars, and so forth. But something like a long piece of text appearing on every page should be avoided.

Another plus to multiple sidebars is maintaining visitor attention. When the sidebar content never changes, visitors will tend to tune it out. If they notice something different in one page’s sidebar, they’re more likely to pay attention to all the sidebars.

Keep your visitors engaged, and they’ll keep coming back.

Have you ever used a plugin or code to add custom sidebars to WordPress? Have you gone to a single-column layout in the past but then returned to sidebars? Let me know in the comments.

The post How to Use Simple Page Sidebars and When You Should appeared first on GreenGeeks.

]]>
https://www.greengeeks.com/tutorials/simple-page-sidebars/feed/ 0
How to Display Most Commented WordPress Posts https://www.greengeeks.com/tutorials/display-most-commented-wordpress-posts/ https://www.greengeeks.com/tutorials/display-most-commented-wordpress-posts/#respond Mon, 14 Jan 2019 16:00:32 +0000 https://www.greengeeks.com/tutorials/?post_type=ht_kb&p=23027 I am asked over and over; what is the best way to display my most popular WordPress posts? While there are a number of ways …

How to Display Most Commented WordPress Posts Read More »

The post How to Display Most Commented WordPress Posts appeared first on GreenGeeks.

]]>
I am asked over and over; what is the best way to display my most popular WordPress posts? While there are a number of ways to display popular posts on your site, I feel the best way to do it is to display posts that spark conversation. The posts that have the most WordPress comments are usually a great way to go.

That said, it is important to actually moderate your comments section to remove spam. Otherwise, you might be promoting an article that a lot of spambots found instead of the posts that real visitors like. Luckily, WordPress makes this easy to do.

In this article, I will show you how to display WordPress posts with the most comments on your site.

Why Comments Matter

It’s easy to not understand the importance of a bustling comment section, but it doesn’t make it any less important.

The comment section helps websites build a community and interact with them. Visitors can interact with your content or other visitors. And once that community bond is formed, they keep coming back to see what their online friends have to say.

Comments also provide valuable feedback on your content.

Unfortunately, as content creators, it’s hard to know how your content will be received, and if you don’t get much traffic, it can be hard to improve. Comments can help you gather feedback and make improvements based on your visitors.

And with the explosive popularity of memes over the years, the comment section has become an excellent place to share them, if you allow images. This by itself can keep visitors coming back multiple times to the same post.

It’s also worth mentioning that positive comments can help ensure visitors that your content works, in the case of tutorials. In fact, it’s not that uncommon for a visitor to check the comment section to make sure the guide is working.

How to Show Off Your Most Commented Posts

Step 1: Install WordPress Popular Post

The WordPress Popular Posts plugin is a very simple plugin that allows you to display your website’s most popular posts. Of course, the real question is how does it determine which are popular, and the answer is simple. It doesn’t.

Instead, it provides users with a set of factors they can use to determine what is the most popular. For instance, you can use comments as the gauge and display the posts with the most comments, which is what we are after. Other factors include total views and average daily views.

The first thing you want to do to display WordPress post comments of your most popular posts is to install and activate the WordPress Popular Posts plugin.

Install and activate wordpress popular posts plugin

This WordPress comment plugin allows you to display popular posts in a number of ways, including displaying them by the amount of WordPress comments each post has.

Now, there are some settings you can go view if you would like. You would simply click on Settings > WordPress Popular Posts.

Click on settings then wordpress popular posts

You will see some of the options available to you there. These settings will include options like Log Views, Log Limit, Data Caching and a way to place a default thumbnail if your post does not have a default image.

You will also find the stats area of the plugin, which will be automatically filled based on the WordPress comment display settings you choose.

Wordpress popular posts stats area

Step 2: Display Most Commented Posts in Sidebar

The meat of this WordPress comment plugin lies in two spots. You can use shortcodes (which I will go over below), or you can use the WordPress comments box in your widget area to display your most commented on WordPress posts in the sidebar of your website.

When you have activated the plugin and looked at the settings (if necessary) simply click on Appearance > Widgets to get to the widget area of your WordPress website.

Click on appearance and then wodgets to access the popular post widget area

Once there you will see the WordPress Popular Post widget in the widget area. Drag it into your site sidebar and configure the WordPress comment box the way you would like it to display.

You will see that there are a lot of different configuration options. In order for the WordPress comment plugin to display the most popular posts by comments, you will need to select “Comments” under the “Sort posts by” dropdown box option.

Select comments in this dropdown box under configuration

The rest of the configuration options include things like:

  • Time Range
  • Post Type
  • Post ID
  • Custom Taxonomies
  • Author ID
  • Post Settings
  • Stat Tag Settings
  • HTML Markup Settings

Step 3: Display Most Commented Posts Within a Page or Post

The WordPress Popular Posts plugin also comes complete with a shortcode that will allow you to display all of your most engaging and popular content within a post or a page.

The shortcode is just as powerful and engaging as the widget is and will allow you to display content in other parts of your site besides the main sidebar. For example, you can display WordPress’s most popular posts by comments on your “About” page.

To display the all-time top 10 most commented on posts on your website you would use the following shortcode:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]

[wpp range=all stats_comments=1 order_by=comments post_type=post,page limit=10 wpp_start=

    wpp_end=
]

[/ht_message]

To view a whole list of shortcodes and parameters go to Settings > WordPress Popular Posts and click on the FAQ section. Scroll down to the shortcode parameters question and click on it to expand. This will give you the info you need.

Congratulations on setting up the WordPress Popular Posts plugin.

Do Comments Affect SEO?

You may be wondering if there is a correlation between an active comments section and your rankings. Luckily, Hubspot already found the answer to that question. By analyzing over 100,000 blogs, the data shows that there is no correlation between comments and SEO.

However, do note that comment sections that are very active have more direct traffic, which can help organic traffic results.

Should I Moderate Comments?

By default, WordPress requires the site owner to approve every comment. This is to ensure that inappropriate comments do not get through. By properly moderating comments, you can help keep your website’s comment section clean. It also helps protect against comment spambots.

Keep in mind that this can be changed via a plugin. In those cases, comments can go live immediately after submitting a comment. While this gives you less control, it does reduce the number of notifications you receive and helps keep the comment section going 24/7.

Should I Make Visitors Login to Comment?

This can significantly help reduce the amount of span found in the comment section. However, the harder you make leaving a comment, the less likely you are to receive one. This is highly recommended for larger websites that have an established following but shouldn’t be necessary for smaller blogs.

What If I Switched to the Disqus Comment System?

Some developers do not like the default WordPress comment system, instead, they switch to Disqus. And if you made this switch, you have nothing to worry about. This plugin is fully compatible with Disqus and can still get the same results.

Make Sure to Reply to Comments

One of the biggest mistakes you can make is not interacting with your community in the comment section. After all, that’s the entire point of it!

Take a few minutes to reply to the comments, thank them for sharing their opinions, or even laugh at a joke. It’s not difficult and it will help encourage more people to leave a comment. After all, if they enjoy your content, it’s the least you can do.

Some might even be pointing out mistakes that can be easily corrected. This can help bring your content to the next level.

What other ways do you like to display your most popular posts? Do you prefer using the shortcode or the widget to display your most popular posts?

The post How to Display Most Commented WordPress Posts appeared first on GreenGeeks.

]]>
https://www.greengeeks.com/tutorials/display-most-commented-wordpress-posts/feed/ 0
How to Display a Monthly Archive Widget in WordPress https://www.greengeeks.com/tutorials/display-monthly-archives-on-a-sidebar-in-wordpress/ https://www.greengeeks.com/tutorials/display-monthly-archives-on-a-sidebar-in-wordpress/#respond Thu, 25 Oct 2018 15:00:26 +0000 https://www.greengeeks.com/tutorials/?post_type=ht_kb&p=20450 Do you want to display monthly archives on your WordPress sidebar? A WordPress archive widget is one way to make your older content easier to …

How to Display a Monthly Archive Widget in WordPress Read More »

The post How to Display a Monthly Archive Widget in WordPress appeared first on GreenGeeks.

]]>
Do you want to display monthly archives on your WordPress sidebar? A WordPress archive widget is one way to make your older content easier to find. They are extremely useful for websites that have been around for a time, and there are many ways to customize their appearance.

The ideal place to display archive information is in your sidebar or footer. In most cases, the sidebar is visible on almost every page, which makes it the perfect placement. Keep in mind that this could potentially take up a lot of space, depending on the amount of content you have.

Today, I will show you three different ways to display monthly archives in a WordPress sidebar or footer.

Why Using WordPress Archives Can Boost Pageviews

We sometimes overlook the fact that the more content we publish, the harder it becomes to find our older content. Of course, that makes it difficult for your older content to attract visitors.

One of the most well-known SEO tips is to publish a lot of quality content. Because the more quality content you publish, the better the chances of your website ranking higher in search results.

That’s why organizing your website becomes important. As the number of available information increases, making older information discoverable becomes difficult.

Using taxonomies like categories, subcategories, and tags can help visitors find the content they are looking for. Making an archive list available can help even more.

Remember, the longer it takes a visitor to find content, the more likely they are to go find it somewhere else.

Three Ways to Add and Use an Archive Widget

Method 1: Built-In Archive Widget Method

The first method I’ll show you is using the built-in WordPress archives widget. It’s the easiest method, but it does have some limitations when compared to the other techniques we’ll discuss.

Step 1: Go to Widgets Area

Click the “Appearance” link and select the “Widgets” option.

Widgets

Step 2: Locate Archives Widget

Locate the Archives widget and drag it into the sidebar area.

Archives Widget

Step 3: Customize the Widget

Enter a title in the “Title” box. By default, the widget will display the month and year on the sidebar.

However, there are two checkboxes that can alter the appearance. The first will display it as a dropdown. While the second will display it like the default view, but with the number of posts next to the name.

Test each option and select the one that best suits your purposes.

Click the “Save” button.

Save the Archives widget

You can now view the changes on your website.

View the archives widget

Method 2: Use Annual Archive

The second method will use the Annual Archive plugin. That enhances the built-in archive widget and provides further customization options.

Step 1: Install Annual Archive

First, install and activate the Annual Archive plugin.

Step 2: Locate the Annual Archive Widget

This plugin will work as soon as it’s activated. It adds a more customizable widget called Annual Archive. You can find it in the widget area of WordPress and add it to your sidebar.

Annual Archive

Step 3: Customize the Widget

If you compare it to the default Archive widget, you’ll notice some new features. They include the archive type (yearly, monthly, daily), format, post type, text before and after links, and the number of archives to display.

They are primarily cosmetic changes, so you should test each one to find the best fit for your website. Just remember to save the changes to view them on your website.

There is one more essential feature that the plugin offers. Unlike the built-in widget, you can easily add custom CSS code to customize the appearance.

To do so, click “Settings” and select the “Annual Archive” option.

Annual Archive Settings

Here you can add custom CSS in the text box the plugin provides. That will allow you to customize the appearance of the widget. That’s a handy feature giving you the ability to match the CSS with the rest of your site.

Method 3: Using Code

Finally, I’ll demonstrate how to add an archive using code. You will need access to your website’s cPanel to edit a backend file. If you choose this method, make sure to back up your website before you begin. Then if a mistake is made, you can revert your website using the backup.

Step 1: Enter the File Manager

Let’s start by logging into your hosting account cPanel and clicking the “File Manager” option. The File Manager is where you can access all of the files related to your website.

File Manager

Step 2: Locate the sidebar.php File

Locate your theme’s sidebar.php file.

Click the “public_html” directory, then click the “wp-content” folder. Inside the folder, you will find all of the content related to your website.

Click the “themes” folder and click the folder for the theme you are working with.

Finally, right-click on the “sidebar.php” file and select the “Edit” option.

Select Edit

A pop-up window will open. It’s warning you to create a backup of your files before editing anything. Making a backup ensures that you can revert your website back to a working state if something goes wrong.

Click the “Edit” button. A new tab will open containing all of the code from the file.

Edit Button

Step 3: Add the Code

Now we’ll add the necessary code to your “sidebar.php” file.

Copy and paste the following code into the file:

get_results("SELECT DISTINCT MONTH( post_date ) AS month ,  YEAR( post_date ) AS year, COUNT( id ) as post_count FROM $wpdb->posts WHERE post_status = 'publish' and post_date <= now( ) and post_type = 'post' GROUP BY month , year ORDER BY post_date DESC");
foreach($months as $month) :
    $year_current = $month->year;
    if ($year_current != $year_prev){
        if ($year_prev != null){?>
          
        
      
    
  • year; ?>
  • month, 1, $month->year)) ?>">month, 1, $month->year)) ?>
  • = 18) { break; } endforeach; ?>

    The code will add an archives list for the past 18 months to your sidebar. It will display the year and the months when the content was published.

    You may realize that 18 months takes up too much room on your sidebar. In that case, you can edit the second to last line and change the limit from 18 months to a smaller number.

    Once you have inserted the code into the “sidebar.php” file, click the “Save Changes” button to finish.

    Save Changes

    You can now visit your website to see it in action.

    When a visitor clicks on a specific month, they will see all of the content that was published during that month.

    Select the month you would like to see the content for.

    That’s all there is to successfully add a monthly archive to your WordPress sidebar or any other widget area.

    Other Archive Widgets to Try

    The bread and butter of WordPress is the wide selection of plugins you can choose from. There are often dozens of plugins to choose from and archives are no exception. Let’s take a look at three more plugins.

    Collapsing Archives

    Collapsing Archives

    One of the biggest problems that can arise from placing your archives in the sidebar area is the amount of room it takes up. As your website ages, the amount of content it contains grows, and it can get a bit much to display in one location.

    The Collapsing Archives plugin fixes this by allowing you to break it up by year and month in a collapsable format.

    Simple Yearly Archive

    Simple Yearly Archives

    The Simple Yearly Archives plugin allows you to group your archives by, you guessed it, the year they were released. It’s a great addition to any website looking to create a more organized viewing experience for the archives.

    This plugin also supports a variety of languages, which makes it a great addition to just about any website.

    Category Archives Block

    Category Archives Block

    The Category Archives Block plugin allows you to add the archives of any category on your website. This is all done from within the Gutenberg editor using the Category Archives Block itself.

    Thus, you can also add this to posts and pages and not just the widget area. That said, be sure to watch how many entries are in a specific category, as it could easily overrun the sidebar.

    The Importance of Archives

    Archives are an essential part of any website. They are a great way to display your older content to visitors in a simple interface. There are many ways to approach archives.

    You can choose to make your own custom archive page, display them on the home page, or display them in a widget area with an archive widget.

    Regardless of the location, it is important to make it easy for your visitors to discover your content.

    Getting clicks on older content is just as important as drawing attention to newer content. Remember that your older content is the backbone of your website. The older content is what made the website grow, and it is still valuable.

    How many months of archives have you chosen to display? Was the choice influenced by the amount of space you have on your sidebar?

    The post How to Display a Monthly Archive Widget in WordPress appeared first on GreenGeeks.

    ]]>
    https://www.greengeeks.com/tutorials/display-monthly-archives-on-a-sidebar-in-wordpress/feed/ 0
    How to Display Random Quotes in a WordPress Sidebar https://www.greengeeks.com/tutorials/display-random-quotes-wordpress-sidebar/ https://www.greengeeks.com/tutorials/display-random-quotes-wordpress-sidebar/#comments Mon, 23 Apr 2018 14:00:14 +0000 https://www.greengeeks.com/tutorials/?post_type=ht_kb&p=18392 Do you want to share random inspirational quotes with your visitors in WordPress? Throughout history, many inspirational, motivational, and just plain awesome quotes have been …

    How to Display Random Quotes in a WordPress Sidebar Read More »

    The post How to Display Random Quotes in a WordPress Sidebar appeared first on GreenGeeks.

    ]]>
    Do you want to share random inspirational quotes with your visitors in WordPress? Throughout history, many inspirational, motivational, and just plain awesome quotes have been created.

    Some of these quotes help people make it through tough days, while others help motivate them to greatness. You can share your favorite random quotes in WordPress by using the Quotes and Tips By BestWebSoft plugin.

    For example, if you have 3 quotes named quotes 1, 2, and 3 and you are currently displaying quote 1 when the visitor presses the button, quote 2 will appear.

    Once you set up a self-hosted WordPress website, the rest of it is quick and easy.

    Why Show Random Quotes on Your Website?

    Depending on the nature of your website, displaying quotes can fit in perfectly. There is a quote for almost any situation and if there isn’t, you can just make one of your own. The plugin allows you to manually enter any quote and author, but don’t abuse it.

    For example, if you are posting “A person who never made a mistake never tried anything new” which is a famous Albert Einstein quote, do not put your name or the wrong person’s name as the author. This can take away your website’s credibility.

    Keep in mind there is a large number of quotes where the author is unknown. In those situations, it is best to list the author as Anonymous. Make sure the quotes match the tone that your website is creating.

    For instance, if your website is trying to motivate visitors, use a motivational quote.

    Today, I will demonstrate how to add quotes to your WordPress sidebar using the Quotes and Tips By BestWebSoft plugin. This plugin allows you to add a lot of quotes to your sidebars.

    Let’s take a closer look at the plugin before we add it to your site together.

    Quotes and Tips By BestWebSoft

    Quotes and Tips

    The Quotes and Tips by BestWebSoft is a plugin that allows you to place quotes and tips throughout your website. It allows you to customize the box for those quotes and tips, which makes it a great addition.

    One thing that the plugin does not do is generate a random quote. Instead, you are going to use an actual random quote generator. These will let you find quotes you would like to include on your website. Simply copy and paste them into the plugin after installing.

    To find a quote generator, just search on Google, there are thousands of them. If you are looking for a specific theme, like history, they do exist.

    Display Your Random Quotes in the Sidebar

    Step 1: Install and Activate the Plugin

    Let’s start off by clicking on Plugins and selecting the Add New option on the left-hand admin panel.

    Add New Plugin

    Search for Quotes and Tips by BestWebSoft in the available search box. This will pull up additional plugins that you may find helpful.

    Search for Quotes and Tips

    Scroll down until you find the Quotes and Tips by BestWebSoft plugin and click the “Install Now” button and activate the plugin for use.

    Click on the Install Now Button

    Step 2: Add Quotes or Tips

    The plugin adds the Tips and Quotes sections to the admin bar. While they are separate sections, they are basically the same thing but with different names. Thus, while I will focus on quotes, the tips section is identical.

    On the left-hand admin panel, click on Quotes and select the Add New option.

    Add New Quotes

    Here, you can add a title and then enter the quote into the text box. It’s very basic, but this is how you can enter quotes to display on your website. However, as I said earlier, the plugin doesn’t generate quotes by itself.

    Thus, you are going to want to find a random quote generator and begin copying and pasting quotes. You may be concerned about copyright, but as long as you include the author, you won’t have any issues.

    At least for general quotes.

    Take the time to add a variety of quotes to cycle through on your website. I highly recommend adding more than 20 quotes to have a good spread.

    Step 3: Configure the Settings

    Now, you should take a moment to configure the settings. The settings are where you can configure the appearance of the box that contains the quote, so it’s pretty important.

    By default, the box will have a header of “The quotes from our clients.”

    While this can work for some websites, you probably want to change it to match your own. For instance, you might just want to call it the quote of the day, or something to that effect.

    To do this, click on the Settings option.

    Note: You may notice that while you were in the Quotes section, it will bring you to the Tips section. The settings are shared between them, so don’t worry.

    Quotes Settings Option

    First, be sure to change the title of your quotes. You can also change the frequency of how long a quote stays before it is rotated out as well as some other settings.

    Configure Quotes and Tips Settings

    If you click on the Appearance section, you can customize the quote card. This includes changing the colors, or even adding your own background image.

    Customize the Appearance

    The rest of the options are up to you. There is a section for adding custom CSS, so that’s another design option at your disposal. Be sure to save the changes before moving on.

    Step 4: Display Random Quotes in WordPress

    Now that you have added quotes to the library and customized how they will look, all that’s left is to actually display them. To do this, all you need to do is copy and paste a shortcode into the desired location. It’s pretty straightforward.

    Simply copy the following shortcode:

    [quotes_and_tips]
    

    Paste it into the desired location. For example, let’s say you want the quotes to appear exclusively on your homepage. Not a problem, just paste the shortcode on your homepage and they will appear.

    However, if you want to display the quotes at all times, the best location is going to be your sidebar area (assuming you have the room).

    To do this, click on Appearance and select Widgets.

    WordPress Widgets

    Add a shortcode block in the desired widget area and paste the shortcode.

    Quotes Shortcode as a Widget

    And with that, you will be done. You can view the quote on your website…congratulations.

    Additional Random Quote Plugins

    As you might expect from the WordPress platform, there are a variety of plugins you can choose from. That said, most of the random quote plugins in WordPress work pretty similarly.

    If you want to try another plugin, here are a couple to consider:

    Quotes llama

    Quotes llama is a great way to add random quotes in WordPress

    Quotes llama is a great alternative to the Quotes and Tips plugin above. It’s similar as it allows you to build a directory of quotes and add them via shortcodes.

    One of the main differences is Quotes llama gives you the ability to attach an icon to the quote. You can use this to add a photo of the individual who said the quote or something else entirely.

    Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget

    Testimonial Grid

    When you really think about it, testimonials are random quotes from your customer base. And many businesses take the time to display the ones that make them look good.

    Why? Because it makes them look trustworthy.

    One of the best ways to add testimonials is the Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget plugin. This allows you to add testimonials to the plugin and rotate through them on any post or page.

    Randomize

    Randomize

    Randomize is another great choice when you want to add random quotes in WordPress. You can add the quotes to the plugin, and then display them randomly using a shortcode or a dedicated widget.

    One of the unique features offers is the ability to add quotes in bulk. Other plugins usually require you to add them one at a time, but not this one. Instead, you can add multiple quotes at once to speed up the process.

    Note: The above plugin has not been updated in some time, but still works fine as of November 2022.

    Do I Need to Credit the Website I Got A Quote From?

    Not the way you might be thinking.

    Let’s say you are displaying the famous quote, “It’s-a me, Mario!” Most quotes will end with the person who said it, in this case, that would look like “-Mario” and that would be more than sufficient.

    Now, if you’re taking a quote directly from a website or blog, you might want to put the website instead of the person. A lot of creators will also include backlinks where the quote was pulled.

    The one thing you might need to be more careful about is if you include a photo of the individual who said the quote. You need to make sure to use a royalty-free image, which there are plenty of for famous historical figures.

    Random Quotes Can Motivate Visitors to Return

    Visitors can visit a site for any reason. You may have released a new piece of content, feature, product, or service. But sometimes visitors will come back for something else. Your quotes could be that something else.

    Reading a motivational or inspirational quote can help someone make it through a tough day. Your visitors will appreciate your website if it provides good quotes.

    These quotes will blend in really nicely if you write blogs about life events. You may also wish to pull your own quotes out of your content to display.

    Placing your quotes next to well-known individuals like Albert Einstein will make you look better as a content creator.

    Just make sure you don’t give credit to the wrong person.

    Final Thoughts

    Adding your favorite quotes to a WordPress site can make your site more personable and give users a deeper look at who you are and what your site is all about.

    It can also act as a calming factor for site users, as there might be a good chance they enjoy some of the quotes being displayed.

    I hope this tutorial was able to show you how easy it is to add random quotes to your WordPress site. With a smooth, simple-to-use plugin like Quotes and Tips by BestWebSoft, the entire process is fairly easy and quick.

    What is your favorite quote of all time? Do you think your visitors will appreciate seeing famous quotes when they visit?

    The post How to Display Random Quotes in a WordPress Sidebar appeared first on GreenGeeks.

    ]]>
    https://www.greengeeks.com/tutorials/display-random-quotes-wordpress-sidebar/feed/ 1