Use Breakdance’s post loop and conditions to display entire book series on each title’s page, boosting engagement, SEO, and guiding readers to more of your work.
In the previous lesson we created a section with a post loop builder to display a grid of the 6 most recently published books.
Great idea in theory but we were on a Dylan Danger book post and the Latest Releases all displayed Village Detective books.
Even if the books were in the same genre it may be preferred to show the reader all the books in the series from the book they are currently looking at.
The idea is that if a visitor sees there are multiple books in a series in a genre they enjoy they are more likely to invest time and or money in that first book and beyond.
We’ve already done most of the work to get what we need so this will be similar to the set up from the last lesson when we create the Latest Releases section
Instead of something generic we want the heading to be specific about which series is being displayed.
And we are done.
Excerpt we’re not.
If I go to the live Dirk Volcano site and click on a Dylan Danger series book the Book Grid at the bottom looks great, it’s really doing it’s job.
But
When I go and look at one of the Village Detective books. Not so much. Now we are looking at Thriller books from a different series being shown on my cosy mystery novels.
No problem.
First we are going to add a condition to the entire Complete Dyland Danger Section to only show when the series name is Dylan Danger.
When I go back to the work in progress site and click refresh on the Village Detective page the complete Dylan Danger section is gone. When I go back to Adventure Danger the section is back where it belongs.
We also want a complete series display on Village Detective Books.
We’ve just told this section to only appear when the Book post is assigned the series name of Village Detective
All the books in the grid should change from Dylan Danger to the Village Detective
When I check Book posts for each series only the matching Complete Series sections are displayed.
If you have more than two series just repeat the steps for each series you have.
If you have a mix of series novels and standalones create a ‘Standalone’ entry in the series name taxonomy and use that to only show standalone novels in the book grids for standalone novels.
And that’s the final lesson in the Books Custom Post Type module.
This has been a longer module but I hope I’ve been able to share with you the power of custom post templates in Breakdance especially with custom fields.