• Get In Touch
June 2, 2017

WordPress – How to set Featured Images in Bulk Posts

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

WordPress introduced the Post Thumbnails feature in version 2.9. In version 3.0, it was swiftly changed to Featured Image and has remained that way since then. A featured image is an image that is associated with a particular post. Imagine reading an online news magazine that has no image at all. You would be wondering, is it some holy scripture?

Images help convey the message being passed through in posts in a flash. I just see an image of Paul Pogba carrying a Europa league trophy and I immediately know Manchester United has just won that competition. I don’t have to read the article. It’s instant. I can read just for details like who scored or how did the game fare, but not for who won. I see you laughing in an image and I instantly know you were happy. I don’t have to ask if you were really happy. I may ask why you were happy. But whether your were happy or not isn’t a question any more.

Featured images help us get the gist of a post in an instant. However, if you have hundreds of posts that don’t have these images already, it’s very painful trying to set them one by one. It’s the situation I found myself in some years back. I had hundreds of technical posts, I wanted to show some thumbnails along with the post excerpts in either a grid or list. I thought about trying to edit them one by one and it wasn’t very wise for me. Given they were technical posts, I didn’t have to really set some particular image for only some particular post. It was okay to assign them relevant images according to category. Or even an easier but acceptable manner was just assign them random images.

This is what we will do in this lesson: How to set featured images randomly to bulk posts, or how to set featured images according to taxonomies. Let’s go.

Objectives

In this lesson we aim to:

  • Assign featured images to bulk posts randomly.
  • Assign featured images to posts according taxonomies like categories and tags.

Advantages of WP Random Post Thumbnails Plugin

We are using ‘WP Random Post Thumbnails’ plugin because:

  • It’s free and easy to use.
  • It allows us set featured images randomly to either bulk posts or bulk pages. We can also do this with custom post types.
  • It allows us set featured images according to taxonomies like categories and tags. We can also do this with custom taxonomies.
  • It receives regular updates.

Installation

To install our WP Random Post Thumbnails plugin:

  1. Head over to WordPress plugins’ portal. Search ‘Random featured Images’.
    HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/962395443.png” alt=”Install Plugin” />
  2. Click ‘Install Now’ button to install our plugin.
  3. Once it’s installed, click ‘Activate’ button to activate the plugin.

Setting Featured Images

Once the plugin is installed and activated, let’s configure it:

  • Click the Settings as shown below to move to settings page.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1491979228.png” alt=”Settings” />

  • In the global options tab, let’s first add images from the media gallery. These are the images that will be set to the posts as featured images. Also choose the post type as well.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/2072937587.png” alt=”Global Options” />

  • We set the images globally above. We can also set the images per post type in the second tab. However, we had already supplied our options in the first tab, so let’s just leave this empty.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1306961197.png” alt=”Post Type Options” />

  • Next, we move to the taxonomy options tab. Here we can set featured images per taxonomy group. Let’s take category. Choose category as below and select images for that category. You can set multiple sets of categories.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/724976042.png” alt=”Category Images” />

  • You can also set featured images per tag. You can add multiple sets of tags.
    HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/196869316.png” alt=”Tag Images” />

Results

Let us see some results:

Random Images in List Posts

Here images are set for posts but not limited to any category or tag.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/150215171.png” alt=”Featured Images” />

Featured Images According to Categories

Here is the result for setting featured images according to categpries. Take note of the categories and the images we had assigned to them earlier.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1110279954.png” alt=”Category feature Image results” />

And that’s it.

Conclusion

Look, just as I had said earlier, I came to recognise the importance of this type of ability to set featured images randomly in one of my blogs some years back. It saved me time editing hundreds of posts. Those who had read my post ealier right here about mysql database optimization can see why editing so many posts isn’t a wise idea. Every revision you make in your posts get stored in the database as well. This bloats your database making it inefficient.

The best thing about this plugin is that you can also set images based on taxonomies like category and tags. The group of images you choose for a given taxonomy shall be set randomly of course. Images are an important visual aspect of a site design. Hence most posts should always have some images. This is not only for aesthetics but is also an important part of SEO(Search Engine Optimization). Images can improve search engine ranking of a given page.

WP Random Featured images makes assigning features images very easy. We therefore have no excuses of not setting featured images. Because not only do we humans like them but search engines do too.

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]