Skip Navigation

[Resolved] Inconsistent Query Filter in Views

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

Problem:

Include current post in view's result.

Solution:

You can edit the view, in section "Query Options", disable the option "Don't include current page in query result".

Relevant Documentation:

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

Last updated by devinH 5 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1087947

There's a .htaccess (I think) restriction on accessing the URL I provided. Just enter the WordPress username and password I provided. They're the same.

I am trying to:
I have a view set up to display author bio, and the view is filtered by the ids parameter in the shortcode.
[wpv-view name="personal-bio" ids="3904"]

My post template uses the following shortcode and it displays properly:

{!{wpv-conditional if="( '{!{wpv-post-id item="@article-author.parent"}!}' ne '' )"}!}
[wpv-view name="personal-bio" ids="{!{wpv-post-id item="@article-author.parent"}!}"]
{!{/wpv-conditional}!}

URL: /this-holiday-season-put-some-swank-in-your-strut/

And in my author page template, I'd use the following shortcode but I'd get a no items found error

[wpv-view name="personal-bio" ids="{!{wpv-post-id}!}"]

URL: /person-category/team/
Just click into any one of the team members

So I created a page to test hardcoded parameters, and I tried

[wpv-view name="personal-bio" ids="3903"]
[wpv-view name="personal-bio" ids="3904"]

The code with 3903 worked but 3904 didn't. After a while, without changing the query filter in my view, both hardcoded shortcodes started working.

URL: /view-personal-bio/

I've even tried hardcoding IDs into the query filter fo the view itself, and was getting inconsistent output from time to time.

Please look into this, thank you.

#1088283

Hello,

I have done below modification in your website:
Edit view "Personal Bio", in section "Query Options", disable the option "Don't include current page in query result", please test again, check if it is fixed. thanks

#1088301

Yes, it's fixed now. Thank you so much. I can't believe it's that simple.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.