Exercise: Bulk actions on the blog posts

Hire a WordPress Expert on Codeable
Updated On: January 14th, 2025 0 Comments

Imagine you want to add a ” Featured ” category to four specific blog posts.

There are two ways to achieve this:

πŸ’‘
The following two approaches assume a particular category is already created and ready to assign to blog posts.

First approach: By adding the category to one blog post at a time – A tedious approach

 
0:00
/

Step 1– Go inside the “All Posts” screen and click “Quick Edit” for the first blog post you want to add the category for.

Step 2- Add the category and click the update button to save the changes.

Step 3 -After this, repeat steps 1 and 2 for the rest of the blog posts individually.

This approach is timing consuming and tedious because imagine repeating these steps for 10 or 15 blog posts or even more.

Lots of work, right?

Second approach: The easier and quicker approach

Simple. We need to use the bulk edit feature.

 
0:00
/

Step 1- Go inside the “All Posts” screen.

If you notice, there is a checkbox beside the title of each blog post:

This checkbox is also called as “bulk edit” checkbox because it helps us select multiple blog posts to edit them in a bulk way.

Step 2

Tick the checkbox of each post that you want to add the category for

Step 3

Once you have selected the blog posts, scroll up to the top of the “All Posts” screen and click the “Bulk actions” box.

This will bring up a dropdown with two options:

  1. Edit – Helps you edit the selected posts (all at the same time)
  2. Move to trash – Helps you move the selected posts to trash (all at the same time)

Select “Edit” and then click on the “Apply” button.

This will bring up the “Bulk Edit” settings.

Step 4

As you can see, the “Bulk Edit” settings look similar to the “Quick Edit” settings.

But if you notice, settings unique to a particular blog post are missing.

For example, the “Title” and “Permalink” settings are unique to a particular blog post. So, they are missing from the “Bulk Edit” interface.

There is no way we want to apply the same title to every post, right?

So, what other settings do we have access to?

The “Bulk Edit” interface only contains the settings that are commonly applied to multiple blog posts at the same time.

For example, multiple blog posts can have the same category, author, status, etc.

So, all these settings are available for us to edit.

Anyway, for this lesson, I want to add the “Featured” category to the selected blog posts.

So, I ticked the “Featured” category.

πŸ’‘
Also, if you notice, all the categories are currently unchecked, and the “Tags” box is empty.

This is because you cannot remove categories or tags when using the “Bulk Edit” feature. You can only assign them.

So, don’t worry that you might accidentally remove the existing categories and tags because the boxes are unselected and empty.

Step 5

As usual, click the “Update” button to save the changes.

That’s all.

With this approach, it doesn’t matter how many blog posts you want to bulk edit.

All you have to do is select them only once to edit them together.

In the next lesson, we will learn how to add a post excerpt to a blog post.