Skip Navigation

[Resolved] Filter posts in Content Template with parameters passed as shortcode params

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 1 voice.

Last updated by nikolasS 5 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2800363

Tell us what you are trying to do?
I have tried to create a content template that accepts a shortcode parameter. then use this content template in my page and pass in the country code.
But it does not seem to work.

Is there any documentation that you are following? NO

Is there a similar example that we can see?
Check: hidden link

What is the link to your site?
hidden link

#2800385

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Content template do not accept any params. You can filter view results by shortcode attribute.

I would suggest rather creating tickets, you should try to follow the course we offer:
- https://toolset.com/course/

First try to exploare by following course and check whats possible and whats not and then if required you should create a ticket.

Regarding - view settings applied to all views, you must have added same view.

As I understand, you created the view using blocks and you want to use the same view but with different query filters on different places - is that correct?
- If yes, when you try to add the view on another place using view block, you should chose the option "Edit Copy" that will create a another copy of the same view and it will not disturb your original view.

Please check the following video:
- hidden link

#2800393
content-template.png

oh. I am sorry. I have gone through the course but many things are not in there.
Based on this view it seems that the View accepts a param as input.
Also a comment is that in the Lessons and Courses i think you could be benefit of AI search because most of my questions cannot be found in the Lessons easily.
It is impossible for a developer to search through documents and lessons.

I will try your recommendation for the Views.

#2800608

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok fine - you may try to use legacy views instead of block view.

If you want to use legacy view, you can enable the legacy view by following the instructions given with the following Doc:
=> https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

Please check the following Doc:
- https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes
- https://toolset.com/documentation/legacy-features/views-plugin/

Please check the following related ticket that might help you to understand how it works:
=> https://toolset.com/forums/topic/short-code-for-filtering-custom-field/#post-2667549

#2801093

i will give it a try