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.
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.