Skip Navigation

[Resolved] like to use a view query with a short code

This support ticket is created 6 years, 9 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.

Our next available supporter will start replying to tickets in about 8.72 hours from now. Thank you for your understanding.

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 7 replies, has 2 voices.

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#545823
Screen Shot 2017-07-06 at 4.26.07 PM.jpg

I am trying to:
use a view filter with a custom field and post short code ( see attached image)

I visited this URL:
RiverSunStone.com

I expected to see:
saved query filter

Instead, I got:
error message (see image)

thanks!

#545909

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - I think you misunderstood the usage of custom field filter using View's shortcode attribute.

When you set custom field filter by shortcode attribute, you need to pass the shortcode attribute from views.

For example:

[wpv-view name="your-view-name" author="[wpv-post-author]"]

And then when you add query filter, instead of [wpv-post-author] you should add author .

More info:
=> https://toolset.com/documentation/user-guides/passing-arguments-to-views/
[Section: "Controlling the filter with shortcode attributes"]

#546263
Screen Shot 2017-07-07 at 3.34.14 PM.jpg
Screen Shot 2017-07-07 at 3.20.36 PM.jpg

Thanks for the info, I setup the view parameter (see attached) but do not seem to find a matching
custom artist_owner field in the custom artists post using the view query filter. Maybe I should be using URL for this ?

I cannot always use the poster option.
In this case, the artist owner owner (may be a producer or label), may own a number of artists and not be the original poster. This is the purpose of this artist_owner being used in this use case. I am using the user_login to search in the query filter. i.g. [wpv-view name="artist1_by_owner_view" owner="[wpv-user field="user_login"]"]
thanks!

#546760

Minesh
Supporter

Languages: English (English )

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

as I understand - you want to filter your view by the current logged in user that filter view posts as logged in user author?

#547198

Hi,
I am using:
view:
artist1_by_owner_view
page:
hidden link

the custom field artist_owner is set by the poster or admin. It grants access to the login user id hopefully. there will be 2 views (unless I can or them in the query filter):
1) artists by poster 2) artists by artist_owner (artist1_by_owner_view)

thanks!

#547206

Minesh
Supporter

Languages: English (English )

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

I need to review your settings and could you please tell me custom field artist_owner contain which value - user ID?

*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#547913

Minesh
Supporter

Languages: English (English )

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

Well - unfortunately, wp-admin access details you shared with me is not working. Could you please resend to me.

Also - You said:
I used URL query filter and it worked for the artist_owner
=> On which page you applied the above filter. Could you please share URL of that page.

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

#548224

Minesh
Supporter

Languages: English (English )

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

Ok fine - thank you.

I'm waiting for your response.

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

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