Skip Navigation

[Resolved] Link to a pre-Filtered Post archive out of a view-result

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1975269

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

#1975429

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>