Skip Navigation

[Resolved] best approach for working with elementor, archives with custom search

This support ticket is created 5 years, 10 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.

Our next available supporter will start replying to tickets in about 5.06 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1184265

I've built a custom post, and want to design an archive with custom searches, I use elementor to do the most of my layout work. on the archive page I work with the archive result set, but as well show a view with related posts.
In the single post layout, I'm using the same filter as in the archives custom search. From what I read, I need to create an individual filtered view, from which I could insert the the view's filter ( wpv-form-view ) in the single post layout.
Passing the query params between the single post and the archive, I'll aks in point 4.
multiple concerns run through my mind.

1) do I build my full archive layout within elementor, and use the toolset shortcodes to show custom filter and results ( [wpv-filter-meta-html] and [wpv-layout-meta-html] ). Do I than assign the elementor template to the archives, and leave the toolset wordpress archive (to build the query) unassigned?

2) or do I build the archive layout with toolset wordpress archive and just use elementor for the individual layout?
In this situation, i'm still challenged by combining the filter, the archive results and the view.
I can do this in the archive output editor, but this becomes a spaghetti of codes.

3) how are archives within toolset connected to post types or individual posts? for the views and layouts this is via the wp_postmeta table and keys are '_layouts_template' or '_views_template'

4) How do I pass / jump from the single post to a filtered archive and pass the arguments from the view's filter in the single post to the archive.
I think I need some kind of java script to grab the filter values, and put this on a url that jumps to the archive.

Any advice on approach, pros and cons is more than welcome.

#1184403

1) do I build my full archive layout within elementor, and use the toolset shortcodes to show custom filter and results ( [wpv-filter-meta-html] and [wpv-layout-meta-html] ). Do I than assign the elementor template to the archives, and leave the toolset wordpress archive (to build the query) unassigned?
Toolset's View or WordPress Archive filter controls are not integrated with Elementor's archive output, and won't have any effect on the results of those archives. They only affect other Views or Toolset WordPress Archives set up to respond to the same URL parameters. The wpv-filter-meta-html shortcode and wpv-layout-meta-html shortcode are only allowed within the context of a View or WordPress Archive's Output Editor, and cannot be used in other areas (like an Elementor template or element).
https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/design-archive-pages-for-custom-post-types/

2) or do I build the archive layout with toolset wordpress archive and just use elementor for the individual layout?
Yes, this sounds like the best approach if you want to use custom search filters in an archive.

3) how are archives within toolset connected to post types or individual posts?
Archives aren't directly connected to individual posts, they are generally connected to post types or taxonomies. You can't assign arbitrary posts to an archive. You can select an archive to apply to a post type, or to a taxonomy, or to a few other types of special archives like search.

4) How do I pass / jump from the single post to a filtered archive and pass the arguments from the view's filter in the single post to the archive.
It sounds like you want to have a custom search View on the single post page, and when you submit the custom search form, you want to redirect to an archive page and have the URL parameters from the search form applied automatically. That's not possible in the current system, because you can only redirect a custom search View's form to a Page, where you can display the results of that View. It is not possible to select an archive as the redirect destination. That would require custom code that falls outside the scope of support we provide in the forums.

#1185188

1) not completely true.
I've put the shortcodes for building the filter in a toolset wordpress archive the code between filter start and end in an elementor template and but the shortcode of the elementor template between the start and end.
This works.
So partially I can do a visual design in elementor.

[wpv-filter-start hide="false"]
[elementor-template id="71141"]
[wpv-filter-end]

The meta filter codes, indeed seem not to render outside of toolset.

2) thanks

3) the definition of the toolset archives is stored as a sanitized in wp_posts

4) This is possible, through some javascripting and with the wp_terms, to capture the current filter values set...
the values can than be concatenated and attached to the url of the wordpress archive url, this allows to jump from the view filter to the archive...

#1185255

1 - Just to be clear - this is not the recommended way to create custom search filters, and I can't guarantee it will work in all cases, so be cautious. Problems related to misuse of the system will not be addressed here in the forums.

4 - Great, it sounds like you're able to write your own JavaScript code to accomplish a custom feature. You'll be mostly on your own here. Filter customizations are outside the scope of support we provide here in the forums, because there is no public API for filters.