How to Show Random Quotes in WordPress Sidebar

Do you want to display your favorite quotes in your WordPress site? Perhaps you have inspiring and motivational quotes that you want to auto-rotate in your sidebar? In this article, we will show you how to easily add random quotes in WordPress sidebar.

First thing you need to do is install and activate theΒ Quotes CollectionΒ plugin. For more details, see our step by step guide onΒ how to install a WordPress plugin.

Upon activation, you need to visitΒ Quotes Collection Β» OptionsΒ page to setup the plugin settings.

Here you can change the text of link that will show a different quote to users. You can also select the number of iterations to load on refresh, the default option is 20.

If your site shows the same quote to users due to your cache plugin, then you need to check the last option β€˜Dynamically fetch the first random quote in widget’.

Don’t forget to click on theΒ Update OptionsΒ button to save your changes.

Adding Quotes to Build Your Quotes Collection

While there are WordPress plugins that allow you to automatically fetch quote of the day from popular quotes websites. The problem with using those plugins is that they will link back to their own website in each quote.

Quotes Collection lets you build your own collection of quotes. This allows you to offer a more authentic user experience by adding quotes that are more suitable for your website and your users.

Simply visitΒ Quotes Collection Β» Add NewΒ page to start adding random quotes.

Enter quote text and then enter the author name. You can optionally mention a source if you want.

You can also addΒ tagsΒ for each quote. This is optional and will allow you to later fetch quotes based on tags.

Lastly, check the box next toΒ PublicΒ option to make your quote publicly available. Unchecking this box will keep your quote stored as a draft, and it will not appear in the sidebar widget or shortcode.

Finally, click on theΒ Add QuoteΒ button to save the quote. Repeat the process to add more quotes.

You can always edit a quote by visitingΒ Quotes Collection Β» All QuotesΒ page and clicking on the edit link below the quote you want to edit.

Displaying Random Quotes on Your WordPress Site

Quotes Collection provides multiple ways to display quotes. Depending on how and where you want to display random quotes on your site, you can choose any of these methods.

First method uses the plugin’s built-inΒ widget. This method is easier and recommended for beginner users.

Visit theΒ Appearance Β» WidgetsΒ page in WordPressΒ admin area.

Under the list of available widgets, you will findΒ Random QuoteΒ widget. Simply drag and drop the widget to aΒ sidebarΒ where you want to display random quotes.

The widget settings are quite self explanatory and default options would work for most websites.

The most important option is the ability to refresh quotes and the ability to auto-rotate quotes every X seconds.

Once you are done choosing your settings, click on the save button to store your widget settings.

You can now visit your website to see random quotes displayed in sidebar with anΒ AjaxΒ powered link to load next quote.

The second method is to use aΒ shortcodeΒ to display quotes inΒ WordPress posts and pages. Simply add this shortcode to a page or post where you want to display quotes.

[quotcoll ]

You will notice that the plugin will just display all your quotes in a list.

Unfortunately, the shortcode method does not come with ajax refresh feature. It is intended to display a plain list of quotes on posts and pages.
Β 
However, it does come with lots of parameters that you can use to control the display of quotes.
Β 
Here are a few examples of using the shortcode with different parameters.
Β 
This will display all quotes where Martin Luther King, Jr. is the author.
Β 
[quotcoll author=”Martin Luther King, Jr.”]
Β 
This will display quotes tagged with inspirational,motivational, and life tags.
Β 
[quotcoll tags=”inspirational,motivational,life”]
Β 
This will display 10 quotes on each page with pagination.
Β 
[quotcoll paging=true limit_per_page=10]

VisitΒ plugin’s documentation pageΒ for a full list of parameters.

Import and Export Quotes Between Different WordPress Sites

Quotes collection comes with built-in import/export feature. It allows you to export and download your quotes collection from one site and then import them to another site.

Simply visitΒ Quotes Collection Β» ExportΒ page to download your collection in a file.

After that you need to install the plugin on the WordPress site where you want to import the quotes.

Now visitΒ Quotes Collection Β» ImportΒ page to upload and add quotes from your export file.

That’s all, we hope this article helped you learn how to show random quotes in WordPress sidebar. You may also want to see our list ofΒ 25 most useful WordPress widgets for your site.

If you liked this article, then please subscribe to ourΒ YouTube ChannelΒ for WordPress video tutorials. You can also find us onΒ TwitterΒ andΒ Facebook.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!

Pin It on Pinterest

Add address