https://github.com/sayhellogmbh/shp-migrate-areas
https://github.com/sayhellogmbh/shp-migrate-areas
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sayhellogmbh/shp-migrate-areas
- Owner: SayHelloGmbH
- Created: 2025-02-21T16:09:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-21T17:07:19.000Z (over 1 year ago)
- Last Synced: 2025-08-29T10:04:17.379Z (11 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Migrate Areas
Moves content from the _Arbeitsgebiete_ pages into the custom post type sht_areas. Then parse the content to remove old accordion blocks.
Be careful with this code and these commands. There is no undo. Always backup your database first!
## Procedure
1. Activate plugin.
2. Create taxonomies.
3. Run e.g. `wp sht migrate areas 23 --term_id=41` to migrate all accordion blocks on page 23 to the custom post type, and assign them to term 41.
4. Run `wp sht fix migrated areas --level=2` to migrate the formerly second-level nested accordions in the new posts to h2 / content blocks.
5. Run `wp sht fix migrated areas --level=3` to migrate the formerly third-level nested accordions in the new posts to h3 / content blocks.
## Additional
Added later, the command `wp sht switch-language` changes the language of all posts created after _today 17:30_ to French. This was because of the
omission of the language details when creating the initial posts.
## Author
[Mark Howells-Mead, Say Hello GmbH](https://sayhello.ch/), since 21st Feburary 2025.