Skip Navigation

[Closed] Query Filter by ShortCode isn’t working for me

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 5 replies, has 1 voice.

Last updated by Minesh 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2792372
2025-01-15 - Toolset Screenshot.png

Tell us what you are trying to do?
I am trying to create a view that I can pull with a shortcode. I want to pass in the post id so the view only shows one post.

Is there any documentation that you are following?
I have followed the screen prompts and searched, and asked ChatGPT to help me, but wasn't able to figure it out.

Is there a similar example that we can see?
See screenshots

What is the link to your site?
hidden link

#2792414

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I wouldl like to know you are using query filter where you filter the post ID using shortcode attribute "ids".

Can you pleae share how you are displaying your view?

Is it like:

[wpv-view name="view-name" ids="[your-custom-shortcode]"]

#2792470

The third image in the set of screenshots I have attached shows the actual post where I am trying to invoke the view.
The shortcode I am using is: [wpv-view name="webinarView" ids="28237, 1234"]

The fourth image is what I am getting as a result. It is showing the view, the issue is that it is not using the query, it is pulling in the most recent posts of the type I had selected, not the ones in the "ids" as identified in the shortcode.

I had tried using one (i.e. ids="28237", I've tried multiple, I've tried one that is valued and one that is not. I've tried doing one without the quotes thinking maybe string versus integer, but nothing I've tried has worked.

#2792637

Minesh
Supporter

Languages: English (English )

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

That is really strange.

Can you please share problem URL and admin access details and let me review what's going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2793097

I have spent the last several hours trying to create a test instance of my website to share with you, and in doing so Toolset stopped working, and while doing it I think I figured out the problem. It doesn't like it when I pass in id="" or ids="" into the shortcode. if I instead use [wpv-view name="webinarView" show="28237, 1234"] and then change the filter to use "show" from the shortcode attribute, but don't change anything else, it works. So something about using the "id" or "ids" shortcode attribute is not working. That said, what I need is working, but wanted to still let ou know in case it is something on the programming side that would help others.

#2793125

Minesh
Supporter

Languages: English (English )

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

If you can share problem URL and admin access details with details about the issue you have about what view you are using and what shortcode you want to use and filter with what IDs.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] Query Filter by ShortCode isn’t working for me’ is closed to new replies.