Skip to content

Commit b484568

Browse files
committed
docs: refresh README for the 1.0 release
- Document the slug-change protection (block editor + Quick Edit) - Add WPML to the integrations list - Add a manual zip-install path alongside Composer - Add an "Upgrading from 0.x" section explaining the use_slug opt-in flip and the auto-migration that preserves existing URLs - Bump the WordPress requirement to 6.0+
1 parent 2ea1ebe commit b484568

1 file changed

Lines changed: 31 additions & 2 deletions

File tree

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ An optional checkbox lets you use the assigned page's slug as the post type's re
4242

4343
> **Warning**: Enabling this option changes all single post URLs for the post type. Consider the SEO implications before toggling it on an existing site.
4444
45+
### Slug-change protection
46+
47+
Once "Use page slug as rewrite slug" is on, changing the page slug breaks every published URL for that custom post type. The plugin guards both editing surfaces:
48+
49+
- **Block editor**: a warning notice and confirmation checkbox appear in the document sidebar; the Update button stays disabled until the checkbox is ticked.
50+
- **Quick Edit** on the Pages list: a confirmation dialog blocks the save until acknowledged.
51+
52+
Both only fire when the slug actually differs from the saved value, on pages assigned to a CPT with "use page slug" enabled.
53+
4554
## Key differences with native CPT archives
4655

4756
| | CPT archive | Page for CPT |
@@ -119,6 +128,16 @@ Requires Polylang 3.4+.
119128

120129
Requires Yoast SEO 26+.
121130

131+
### WPML
132+
133+
Multilingual support via WPML's String Translation:
134+
135+
- Each language can have its own assigned page
136+
- Archive URLs follow WPML's URL structure
137+
- Page slugs are translatable when using the "use page slug" option
138+
139+
Requires WPML 4.5+.
140+
122141
### The SEO Framework
123142

124143
- SEO metadata support
@@ -136,17 +155,27 @@ Requires ACF 6+.
136155

137156
## Requirements
138157

158+
- WordPress 6.0+
139159
- PHP 8.2+
140-
- WordPress with publicly queryable custom post types
141160

142161
## Installation
143162

144-
Install via Composer:
163+
### Composer (recommended)
145164

146165
```bash
147166
composer require n5s/page-for-custom-post-type
148167
```
149168

169+
### Manual
170+
171+
Download the latest `page-for-custom-post-type-X.Y.Z.zip` from the [releases page](https://github.com/nlemoine/page-for-custom-post-type/releases) and upload it via **Plugins > Add New > Upload Plugin**. The zip ships with vendor dependencies bundled, so no build step is required.
172+
173+
## Upgrading from 0.x
174+
175+
1.0 makes the "use page slug" behavior opt-in (it was previously always on). On upgrade, the plugin automatically enables it for every CPT that already has a page assigned, so existing URLs stay intact. If you'd rather use the default CPT rewrite slugs going forward, uncheck the option per CPT under **Settings > Reading**.
176+
177+
The legacy procedural API (`is_page_for_custom_post_type()`, `get_page_id_for_custom_post_type()`, etc.) is preserved as deprecated shims that forward to the namespaced equivalents. They'll emit a `_doing_it_wrong` notice when `WP_DEBUG` is on.
178+
150179
## License
151180

152181
GPL-3.0-or-later

0 commit comments

Comments
 (0)