I use latest WordPress and I went to GenerateWP and created a new custom post type named "book_pages". I pasted the output in the end of my functions.php
. The post-type is available and I can work with it in my site.
I then went to "pages" and added a new page named "all book pages".
I'd like to show trimmed version of all nodes of the "book_pages" CPT under "all book pages".
It should be seem like this:
Basically I need just the headline of each webpage to appear in each box under "All book pages" (and each box will link to the relevant book_page).
I'll further style the boxes with CSS.
But I only need to know how to actually print all nodes of my "book_pages" CPT in the "All book pages" page.
Notes:
- You likely noticed that in this book, each page is actually a chapter-page.
get_posts()
function. Usebook_pages
aspost_type
parameter.archive.php
toarchive-book_pages.php
and modify the content (display only post title with link). Archive page will replace your "All books page".