Hi,
I have created a view loop and put the shortcode to an accordion element in Elementor. so far so easy and GOOD! 🙂
The fields that I have listed are custom fields from a custom post type.
The custom post type are "books" and the fields are the "firstname" and "lastname" of the book author.
So I have created a list of all book authors ordered by their "lastnames".
Now I want to add links to the list (result) items that refer to the archiv of the custom post type "books" but pre-filtered to the custom field "lastname". Use case: So if the user clicks on the last name all books from the book author are shown in a grid of the archiv.
I guess it would be easier if I would use a taxonomy field but than I cannot seperate the first and the last name and this a need at another function of my page.
I guess its a nobrainer for you guys. Sorry for that 🙂
THX
Frank
Hello,
Yes, it is possible within Toolset, for example, you can try these:
1) Follow our document to customize the "Books" archive page:
https://toolset.com/course-lesson/creating-a-custom-archive-page/
Add search form in above Toolset WordPress Archive, see section "Add a custom search to an archive" of above document:
https://toolset.com/course-lesson/creating-a-custom-archive-page/#add-a-custom-search-to-an-archive
In frontend, if you choose one option of "lastnames" field, submit the search the form, it will pass one URL parameter to the result page, for example: hidden link
As you can see the URL parameter name is "wpv-lastnames", "jake" is the custom field "lastnames" value
2) So in the single "Books" post, you can setup a link to above WordPress Archive page, and pass the same URL parameter name with current post "lastnames" field value, for example:
<a href="<em><u>hidden link</u></em> field='lastnames'][/types]">[types field='lastnames']</a>