I have created two custom post types (CPT) say books and reviews. Now how can i auto generated a reviews page for a specific book title??.
What i have done so far i made a review page (page-reviews.php) which displays the reviews based on a book's $id. In CPT "reviews" there is a dropdown menu with id's corresponding the book title.
I thought of something like
But how can i auto generate this url path to be recognized and how do i get the book's $id in reviews (page-reviews.php)
should i alter the
'hierarchical' => true,
'rewrite' => array( 'slug' => 'reviews' ),