Imagine you have thousands of posts in which you have inserted accordions to make them look beautiful and ordered. However, you didn’t ask the plugin to collapse all sections, or you left the first section active. Therefore, you have received comments from your readers who want to be able to collapse all sections or don’t want the first section to be active because they probably want to read the second or third section.
If you want to apply that change to a thousand entries, it will take you a long time because you have to open the entries one by one, enter the accordion options, choose the desired value in Active Section and then save changes. If, for example, you take 1 minute to do this for each entry, imagine how many hours it will take you to edit thousands of entries.
But don’t worry! We want to show you a great solution. We are going to change the values of the Visual Composer elements in thousands of posts in just some minutes and in very few steps.
For this, we’ll use the Posts, Pages, and Custom Post Types Spreadsheet plugin. It’s a great tool that allows you to edit any aspect of your posts, pages and custom post types in a spreadsheet.
You can download the plugin here: Download Posts, Pages, and Custom Post Types Spreadsheet Plugin - or - Check the features
Once you install it, go to Sheet Editor > Edit Posts (to edit posts) or Sheet Editor > Edit Pages (for pages) to open the plugin, and you’ll see the spreadsheet.
Now just follow these simple steps:
IMPORTANT. For this example, we’ll show you how to disable your active accordion sections.
1- Select the element you’ll edit
The first step you need to take is to choose the element you’ll edit. You may be wondering what that means. Well, it’s really simple. Just open any of your posts that contain accordion sections.
Important. Open the post and select the Classic Editor.
Now, if you want to close all the active sections, select and copy this element: [vc_tta_accordion active_section=”1″]
Now go to the Posts Spreadsheet.
2- Open the Bulk Edit tool
This tool will help you edit hundreds of posts in seconds. Therefore, you need to open it. It’s located on the plugins’ toolbar.
3- Filter the posts you’ll edit (Optional)
If you don’t want to edit all the posts, you can easily filter them by keyword, status, author, categories, tags or formats. For that, you need to select the I want to search rows to update option in the Select the rows that you want to update dropdown.
Once there, you’ll see these search values:
- Contains keyword: Use this field to search for all the posts containing a specific keyword.
- Status: Search for all the published, private, draft posts.
- Author: Search for all the posts created by a specific author
- Categories, Tags, Formats: This same field works to find posts in these three ways.
Once you decide how you’ll filter the posts, click on Run search to filter them.
4- Replace the Visual Composer element for the filtered posts
Once you have filtered the posts, you need to set these values to replace the Visual Composer elements.
- Select the rows that you want to update: I want to select rows to update
- What field do you want to edit: Content
- Select type of edit: Replace
- Replace this: [ vc_tta_accordion active_section=”1″]
- With this: [ vc_tta_accordion active_section=””] (As you can see, you need to delete the “1” that indicates the section number)
- Click on Execute now
Done!
That way, you can edit any of the Visual Composer elements in your WP posts. For example, your posts won’t have section 1 active anymore.
It’s really simple and fast. As you can see, you can edit thousands of posts in just some minutes and with these simple four steps.
You can download the plugin here: Download Posts, Pages, and Custom Post Types Spreadsheet Plugin - or - Check the features