1

I would like to know how to edit the content area for many pages. I have many options for bulk editing of pages, such as parent and sidebar, like this image:

bulk edit options

But I can't do this for the actual content of each page. I have a large number of pages that will have the same content, and it would be great to be able to check their boxes on "pages", and quick edit all them for this.

  • Can you give some more details on why you have pages with the same content? This doesn't really sound reasonable and will probably cause issues with en.wikipedia.org/wiki/Duplicate_content – kraftner Mar 25 '15 at 15:05
  • Thanks for asking - the content will be tweaked later for each individual page. If I can get the same content on all of these pages initially, it will be much faster than opening each one and pasting. – Mark Mar 25 '15 at 15:07
  • @kraftner Do you know how to do this? – Mark Mar 25 '15 at 15:09
1

For any other readers I'd like to add in advance that this only really makes sense if you are kind of creating drafts or templates or whatever you want to call it that will be changed later on. Otherwise you'll at least deal with SEO penalties due to duplicate content.

Unfortunately this functionality isn't part of WordPress by default so you'd need to find or create a plugin for that.

One other option is to use wp-cli in case you do feel comfortable using the command line.

wp post update <ids> --post_content=<new content>

Using the wp post update command you can easily edit the content of multiple posts. So for example if you want to edit the posts with the ids 1, 2 and 5 to be changed to "other content" use this command:

wp post update 1 2 5 --post_content="other content"

You can see the ID from the edit screen by hovering the edit link and looking for the ID there.

site.tld/wp-admin/post.php?post=5&action=edit

To easily get all ids for some condition like a category (books in this example) just use the wp post list command.

wp post list --category_name=books --format=ids

This will return something like 1 2 5 which you can then use in the query mentioned above.

Be sure to read the documentation of the commands mentioned above because they offer various other options and commands that could help, like getting the content from a file.

| improve this answer | |
  • Great, I'm looking forward to trying this out. I'll have to get into the wp-cli first. – Mark Mar 25 '15 at 16:22
  • Yes, that worked perfectly. I had my server teammate help me get set up correctly with the cli first, and your solution was ideal. :) – Mark Mar 25 '15 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.