Skip Navigation

[Closed] Passing Arguments to Views

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

Last updated by Minesh 2 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2778704

Tell us what you are trying to do.
I am having a hard time passing arguments for conditional display within a view. I have read through (old) support answers. Many are not using Toolset Blocks. I am hoping you can resolve my issue—or point me to the correct article, which I cannot seem to find. I want to display all other CPTs in a view that has the same field group value as the current Post. Each post gets one value of a certain custom field as the first and main differentiator.

For example, I have a CPT of Outdoor Kitchen Ideas. One of many custom fields assigned to each Outdoor Kitchen Idea is "Layout Type." These include "U-shaped," "L-shaped," "Island," etc. There are several of each layout type.

I want to show all other kitchen ideas filtered by "layout Type" within a view of any given "Outdoor Kitchen Idea" post. When viewing one kitchen that is L-shaped, later on the page, I want to show the user other L-shaped layout options (not U-shaped, Compact, etc)

I have tried taxonomies, but they still have the same issue of reading the field for the current post type to reference the output of other posts. Do I need to create many views and filter out each view? Do I put each of the many filtered views in a conditional block for formatting?

Do I set a template conditionally by the layout type field- only changing the view in the template? ( I want all the posts to look the same.)

I hope to add conditional filters within a single View- unless that is unadvisable.

Are you following any documentation?
https://toolset.com/course-lesson/

Is there a similar example that we can see?

What is the link to your site?
one of many ideas:
hidden link

#2778778

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I need to check how you configure your view.

I checked the problem URL you shared:
- hidden link

As I understand you want to display the posts having same layout assigned as the current post you are displaying under the section "Check Out More U-Shaped Outdoor Kitchen Ideas" - is that correct? if yes:
- Can you please send me admin access details and let me check 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.

#2778835

No. not exactly. The template IS already the same. I want the VIEW for each idea /outdoor-kitchen-idea/ to read and identify the current "layout type" as defined by the field of that name. Then, populate the VIEW with other /outdoor-kitchen-idea/ that match the pages "layout-type."

I can't filter by the pages current (dynamic) "layout-type. I have given up. But at this URL:

hidden link

I want to show L-shaped posts not U-shaped posts. I can filter by taxonomy or field, but I can't filter by a specific taxonomy or field as determined by THAT page.

For instance, I thought surely you would do this for the faux real estate site. a view on every post that "sees" you are looking at houses with basements (for example) and suggests: Check out these other houses with [basements]:
((View on every post that shows related content based on the current post's field value.))

Terry

#2778836

Minesh
Supporter

Languages: English (English )

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

Can you please share what view you are using and you added that view under what section of the page you shared:
=> hidden link

And send me access details and what custom field you want to target and with what value you want to display the posts under what section.

*** 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] Passing Arguments to Views’ is closed to new replies.