forked from MediaRon/post-type-archive-mapping
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
executable file
·384 lines (286 loc) · 12 KB
/
Copy pathreadme.txt
File metadata and controls
executable file
·384 lines (286 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
=== Custom Query Blocks ===
Contributors: ronalfy, chrislogan, paaljoachim
Tags: map pages, archives, post type block, 404 page, category grid
Requires at least: 6.5
Requires PHP: 7.2
Tested up to: 7.0
Stable tag: 5.6.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://github.com/MediaRon/post-type-archive-mapping
Map your archives to pages. Map 404 and term archives as well.
== Description ==
A WordPress plugin for displaying posts and terms (e.g., categories) using a Gutenberg block. Works well with posts, pages, custom post types, taxonomies, and terms.
Bonus: archive mapping.
> **Archive Pages Pro is here**: Map post types, terms, authors, and more to pages. <a href="https://dlxplugins.com/plugins/archive-pages-pro/">Learn more about Archive Pages Pro</a>
<ul>
<li>Map your post type archives to a page for customization of the post type archive page.</li>
<li>Map your category archives to a page for customization of the term archive page.</li>
<li>Map your 404 template to a page and easily customize your 404 page.</li>
</ul>
<a href="https://mediaron.com/custom-query-blocks/">View Documentation and Overview</a>
The plugin currently has three blocks:
* <a href="https://mediaron.com/custom-query-blocks/custom-post-types-block/">Custom Post Types Block</a>
* <a href="https://mediaron.com/custom-query-blocks/term-category-grid-block/">Term (Category) Grid Block</a>
* <a href="https://mediaron.com/custom-query-blocks/featured-posts-by-category-block/">Featured Posts by Category Block</a>
=== Post Type Archive Mapping ===
This plugin allows you to map your custom post type archive pages. Just create a page and go to Settings->Reading to set the page for your archive.
Ensure your post types have <code>has_archive</code> set to true.
<ul>
<li>Select a Public page to use as your post type archive page.</li>
<li>View the archive and you will see the page content instead of the archive content.</li>
<li>Use page templates on your pages for flexibility.</li>
<li>Custom Gutenberg block for showing your posts.</li>
</ul>
=== Term Archive Mapping ===
This plugin also allows you to map your term archives to a page. Just create a page and go edit your term to set the archive page.
<ul>
<li>Create a public page to use as your term archive.</li>
<li>Visit the edit term page and select the page.</li>
<li>View the term and you will see your selected page.</li>
<li>Use Gutenberg on your public page to customize the archive.</li>
</ul>
=== 404 Page Mapping ===
This plugin allows you to map a page to your 404 template, so you can customize a 404 page as needed.
=== Development is on GitHub ===
<a href="https://github.com/MediaRon/post-type-archive-mapping">Development is on GitHub</a>
=== Archive Pages Pro ===
Archive Pages Pro has all the mapping feature of this plugin and more. You can map post types, terms, authors, and more to pages. <a href="https://dlxplugins.com/plugins/archive-pages-pro/">Learn more about Archive Pages Pro</a>
== Installation ==
1. Just unzip and upload the "post-type-archive-mapping" folder to your '/wp-content/plugins/' directory
2. Activate the plugin through the 'Plugins' menu in WordPress
Post Type Archive Mapping
1. Create a custom post type that has an archive
2. Create a page with a custom template. Use the Gutenberg block to show off posts in that Custom Post Type.
3. Go to Settings->Reading and assign the page to the custom post type archive
4. Go to the post type archive and observe the page content is now the archive
Term Archive Mapping
1. Create a public page to use as your term archive.
2. Visit the edit term page and select the page.
3. View the term and you will see your selected page.
4. Use Gutenberg on your public page to customize the archive.
404 Template Mapping
1. Visit Settings->Reading and map your 404 template to a page.
2. Customize the new 404 page.
3. Navigate to a broken URL to preview the 404 page.
== Frequently Asked Questions ==
= I don't see the post types. What's wrong? =
Make sure your post type has <code>has_archive</code> set to true and <code>show_in_rest</code> set to true.
= Can you do posts instead of pages? =
This plugin will only allow mapping to pages.
= Does this plugin work with term (e.g., category) archives? =
Yes. Edit a term and you can map it to any page.
= I need help. Can you help me? =
Yes, just post in the support forums here and I'll do my best to address your issue.
== Screenshots ==
1. Setting up the custom post types block.
2. Styling the block.
3. New Term Grid Block.
4. Settings->Reading option.
5. Term archive option.
== Changelog ==
= 5.6.0 =
* Released 2026-03-06
* Security Fix: Finalizing resolving XSS issue with image alignment as reported by Patchstack.
= 5.5.0 =
* Released 2026-02-19
* Security Fix: Resolving XSS issue with image alignment as reported by Patchstack.
* Bug fix: Resolving PHP warnings when registering classes.
* Enhancement/fix: Blocks are now compatible with Block.json v3.
= 5.4.0 =
* Released 2025-11-15
* Resolving XSS vulnerability with title tag as reported via Patchstack. Ensuring compatibility with WP 6.9.
= 5.3.1 =
* Released 2024-08-27
* Fixing some deprecation notices in blocks.
* Adding information about new plugin Archive Pages Pro.
* Misc. copy updates.
= 5.3.0 =
* Released 2024-07-10
* Hardening REST APIs based on security report from the WordPress security team.
* This is a security release and we recommend updating as soon as possible.
= 5.2.0 =
* Released 2024-03-17
* Fixing a bug in the Term Grid block where the SearchListControl in Woo Components was throwing an error, so the component was reworked.
= 5.1.6 =
* Released 2023-03-17
* Fixing a bug where the term grid didn't show on the frontend.
= 5.1.5 =
* Released 2022-10-02
* Fixing a bug where a term would not save in the custom post types block.
= 5.1.4 =
* Released 2022-10-01
* Updated build scripts.
* Fixing schema errors when it comes to registering attributes.
= 5.1.2 =
* Released 2021-07-28
* Fixing block categories for WP 5.8.
= 5.1.0 =
* Released 2021-03-25
* Seeking volunteer devs if you want to learn blocks and help lower the build size.
* Feature: Can disable post type mapping via the settings page.
* Feature: Can disable the blocks via the settings page.
* Feature: Can disable the columns on the pages screen.
* Feature: Can disable the created image sizes.
* Feature: New admin options to enable/disable settings.
* Bug fix: Selecting individual terms in the term block would not reflect on the front-end.
* Misc: Removing block icon from the Add Blocks screen.
* Misc: Updating block icons and color scheme.
* Bug fix: Tweaking word-break in the terms block.
= 5.0.6 =
* Released 2021-03-09
* Fixing term saving causing archives to fail.
= 5.0.5 =
* Released 2021-02-12
* Mapping to pages now shows a hierachy to more easily select pages.
* New branding. Hopefully less spammy.
* Making readme more descriptive of what the plugin does.
= 5.0.1 =
* Released 2021-02-12
* Fixed the Term block with the block erroring out when modifying the query parameters.
* Testing with WordPress 5.7.
= 5.0.0 =
* Released 2020-09-07
* Added ability to map 404 to a page.
* Fixed Gutenberg bugs in the Custom Post Types block and Featured Posts block.
= 4.5.5 =
* Released 2020-08-23
* Minimium supported version is now WordPress 5.5
* Fixed pagination for WP 5.5.
* Fixed REST API errors for WP 5.5.
* Miscellaneous block fixes and updates.
= 4.5.3 =
* Released 2020-05-17
* Added Polylang support when mapping posts. Added WPML support for the main Custom Post Types block.
= 4.5.2 =
* Released 2020-05-01
* Removing the term redirect as some pages would get "stuck."
= 4.5.1 =
* Released 2020-04-29
* Added pagination to the Featured Posts by Category Block.
= 4.5.0 =
* Released 2020-04-20
* Added featured posts by category block.
* Added block previews.
* New plugin name: Custom Query Blocks
= 4.0.5 -
* Released 2020-04-16
* Added compatibility for Yoast SEO.
= 4.0.1 =
* Released 2020-04-12
* New block: Term (Category) Grid Block.
* HOT FIX: Term Grid wasn't loading.
= 3.3.5 =
* Released 2020-04-07
* Updated plugin architecture.
* Show mapped pages and its own column.
* Mapped term pages now redirect to the correct term.
* Added new contributor: <a href="https://www.easywebdesigntutorials.com/">Paal Joachim</a>.
= 3.3.1 =
* Released 2020-04-01
* Fixing PHP notice saying invalid argument for foreach statement.
= 3.3.0 =
* Released 2020-03-11
* New full post mode for showing off the full post.
* Option to remove the link from the title.
= 3.2.2 =
* Released 2020-02-10
* Plugin was having conflicts with other admin screens when saving terms, resulting in a 403 error.
= 3.2.1 =
* Released 2020-02-03
* Added support for translations.
* Revised loading screen to make it easier on translators.
= 3.2.0 =
* Released 2020-02-03
* Added ability to map term archives to pages.
= 3.1.1 =
* Released 2020-02-01
* Added several order and orderby parameters.
= 3.1.0 =
* Released 2020-01-26
* Removing custom field placeholder if a custom field isn't present.
* Removing continue reading link and post link if custom post type isn't publicly queryable.
* Wrapping excerpt in paragraph tag.
* Add class to readmore paragraph tag for styling.
* Hiding styles options if override styles is present.
* Changing verbiage of remove styles to Override styles.
* Added support for Adobe fonts through https://wordpress.org/plugins/custom-typekit-fonts/
= 3.0.9 =
* Released 2019-12-08
* Added the ability to set a fallback image for the featured image.
= 3.0.7 =
* Released 2019-12-05
* Fixing pagination when a page with the Gutenberg block is set as the front page.
= 3.0.6 =
* Released 2019-12-05
* Moving featured image to its own panel in Gutenberg settings.
* Moving title to its own panel in Gutenberg settings.
* Cleaning up editor styles for headings.
* Adding ability to change the heading HTML tag.
= 3.0.5 =
* Released 2019-12-05
* Adding ability to remove styles so that you can style your own layout.
= 3.0.0 =
* Released 2019-12-03
* Adding custom field support.
* Updating REST API for faster loading.
= 2.2.2 =
* Released 2019-12-02
* Added ability to remove title from displaying.
* Added new branded loading animation.
= 2.2.1 =
* Released 2019-10-29
* Testing up to WordPress 5.3.
* Fixing JS error when jQuery is not defined as a $ variable.
= 2.2.0 =
* Released 2019-08-23
* Bug fix when in grid mode and image is placed below the title.
* Bug fix: skipping taxonomies when there are none.
* Bug fix: fixing capitalization error.
* Enhancement: You can now select fonts for your content areas.
= 2.1.2 =
* Released 2019-06-11
* Fixing pagination
= 2.1.1 =
* Released 2019-05-26
* Some users were seeing featured images twice in the back-end.
= 2.1.0 =
* Released 2019-05-25
* Fixed Gravatar sizing not saving.
* Changing the way excerpts are shown in Gutenberg.
* Added the ability to change taxonomy location.
* Content can now be centered in the Grid view.
* Added border, padding, and background style options in Gutenberg block.
* Added color options for text in Gutenberg block.
= 2.0.7 =
* Released 2019-05-24
* Added the ability to trim the excerpt length.
* Reduce the file size of the Gutenberg block script using a new build technique.
= 2.0.5 =
* Released 2019-04-21
* Conditional term filtering
= 2.0.4 =
* Released 2019-04-18
* Adding support for six columns
* Fixing undefined index error
= 2.0.3 =
* Released 2019-03-29
* Fixed term not being saved when displaying posts
= 2.0.1 =
* Released 2019-01-17
* Fixed pagination when using a page with just the block
= 2.0.1 =
* Released 2019-01-17
* Fixing bug where arguments weren't an array when switching reading types in Settings->Reading.
= 2.0.0 =
* Released 2019-01-06
* Numerous enhancements to the Gutenberg block including showing taxonomies, setting the image type (Avatar vs Regular), setting where the featured image is displayed, selecting the image size, and much more.
= 1.0.1 =
* Released 2018-11-07
* WordPress 5.0 compatibility
= 1.0.0 =
* Released 2018-09-24
* Initial release.
== Upgrade Notice ==
= 5.6.0 =
Finalizing resolving XSS issue with image alignment as reported by Patchstack.