[Resolved] wpv-control-postmeta filter comparison not showing in shortcode

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.

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 1 year, 7 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#1082776

I am trying to: Search for files with a 'File Name' like the input from a custom search filter. I am setting the wpv-control-postmeta filter comparison to 'Like' but no matter what I put in there I am not getting anything different in the shortcode.

I expected to see:

[wpv-control-postmeta field="wpcf-file-name" url_param="wpv-wpcf-file-name" comparison='like']

** I have no idea what the comparison value looks like in the shortcode - I cannot find it in the documentation.

Instead, I got:

[wpv-control-postmeta field="wpcf-file-name" url_param="wpv-wpcf-file-name"]

Thanks guys!

#1082812

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

There isn't "comparison" attribute in shortcode [wpv-control-postmeta], see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-postmeta

In your case, you can setup the custom field filter by this:
1) Edit the view, find the section "Query Filter", if you can not find it, click link "Screen Options", enable option "Query Filter"
2) Follow our document to setup the filter on custom field "file-name":
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

#1082883

Thanks Luo that worked perfectly.

One thing that I have discovered is that only posts added after the query was created were found in the search results. I am guessing that they are indexed in some way. Is there a way to add the other files to the index?

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/split-wpv-control-postmeta-filter-comparison-not-showing-in-shortcode/

#1083520

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I assume the original question has been resolved, please check the new thread for other new question:
https://toolset.com/forums/topic/split-wpv-control-postmeta-filter-comparison-not-showing-in-shortcode/