Learn to add dynamic buttons for additional retailers to book posts. Enhance reader choice and site flexibility by showing links only when fields are populated.
Providing links to multiple retailers on your book pages ensures visitors can purchase your books from their preferred platform. In this lesson, you’ll learn how to create dynamic “Other Retailer” buttons using Advanced Custom Fields (ACF). These buttons only appear when populated, giving you flexibility to manage links for each book while maintaining a clean, professional design on your author website.
Lets take a look at the core Dirk Volcano site.
When I look at the Adventure Danger Books post on the Core Dirk volcano site you can see that underneath the primary call to action there are FOUR entries in the other retailers area.
But
When I look at the Murder at the Parsonage book post, it has no entries for other retailers so doesn’t display any buttons on the front end.
All fully dynamic based on the entries in the book’s post.
Using a combination of custom fields and the conditions feature on Breakdance elements we can have multiple Other Retailer Buttons on a book post that will only show if the field has been populated.
We start with making a choice.
Other Retailers – Yes or No?
From the WordPress admin sidebar go to ACF then Field Groups.
Next we are going to add the first of the Other Retailer Group of fields to capture the retailer name and link.
We’re going to make use of the Select felid we created earlier as conditional reference to only show this group field when Other Retailers is set to Yes.
We’ve set up the Group field now to add the subfields to get the Other Retailers Name and URL.
We’re going to give this core build a maximum of 4 other retailer buttons but luckily we don’t have to create the other 3 from scratch.
ACF will copy, paste and rename the Other Retailer Group field into the Other Retailer 2 Group field inlcidng the subfields.
Now we’ll edit the Adventure Danger book post and add the other places visitors can get the title.
Now, we don’t have to add all four Other Retailer. You’ll see when we set up the Book Post Template the buttons will only show if the fields are populated.
This lesson demonstrated how to create dynamic “Other Retailer” buttons for your book posts using ACF. By adding custom fields and utilising conditional logic, you can manage retailer links that display only when populated. This feature enhances reader choice, streamlines site management, and ensures your book pages look professional and user-friendly, regardless of the number of retailer options available.