Skip Navigation

[Resolved] How to show results for current post only – TOOLSET + ELEMENTOR

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use a shortcode attribute in my View to display information about only the current post, but it doesn't seem to be working. All posts are displayed.

Solution: Use a Text element to insert your nested Types and View shortcodes. Do not use a shortcode element.

This support ticket is created 5 years, 6 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
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 2 replies, has 2 voices.

Last updated by angelapiqui 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1276159
SETUP QUERY FILTER.jpg
Views Widget.jpg
Shortcode-1.png

Hi,

I created a single post template in Elementor and I also created a view in Toolset to display custom fields and taxonomy of my CPT but it's showing all posts at once. I would like it to show only the current post type.

When creating the view, I set up the query filter including a Post ID filter: [wpv-view name="MY-VIEW-NAME" ids="[wpv-post-id]"] - As you can see on the screenshot.

In Elementor I used both "toolset views widget" and "shortcode widget" but they show all posts results.

I read a ticket (https://toolset.com/forums/topic/i-need-to-show-only-the-field-values-of-current-post-of-my-cpt-in-my-view/) which seems to be the same issue that I have and I followed the same steps described there, but still nothing working well. Could you help me with that, please?

Sorry, my site is in maintenance mode, so you wouldn't be able to see my page. Do you need a link?

#1276185

Your filter looks good. Try using the exact same shortcode syntax in a Text element instead of a Shortcode element. In my experience, nested Toolset shortcodes don't function well in Elementor's Shortcode elements.

#1276617

My issue is resolved now. Thank you!