Map a page to the archive of your post types.
- Select a Private or Public page to use as your post type archive page.
- View the archive and you will see the page content instead of the archive content.
- Use page templates on your pages for flexibility.
Your post types need to have has_archive
set to true.
Go to Settings->Reading. At the bottom you will see a place to map your post types.
-
Clone the repo to any location you choose.
-
Run
npm install
inside the folder. -
Run
npm run build
inside the folder. -
Set up a symlink to your WordPress installation using the folder as the base.
-
Run
npm run watch
to make changes and thennpm run build
when you're done. -
To edit the block, they are in
/blocks/load.js
and/blocks/edit.js
. -
The REST API is created and passed in
/blocks.init.php
. -
The attributes and output are in
/blocks/class-post-type-select-posts.php
.
Chris Logan for coming up with the idea.