Skip Navigation

[Resolved] filter a view by the current dynamically created post

This support ticket is created 3 years, 10 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 10 replies, has 3 voices.

Last updated by chuckP 3 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2341449

I have post being dynamically created from json data. i have created a view to display all posts. when you click on "more details" for a single post, it creates a single post page with the url ending with the dynamic information from a custom field called "property id"

hidden link

i am using a view to show data from a custom repeating field called "features". i need to filter to only show the features for the current post... i have tried the post id filter, with no luck

#2341559

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chuck,

Thank you for getting in touch.

I'm assuming here that the property id is being dynamically added and it has this property id holds the relational data for the repeatable field?

Also is this a repeatable field group or just repeating fields.

Please let me know.
Thanks,
Shane

#2341611

I'll try and explain it in a different way...A post gets created from the " imported" Json data. Several custom fields get populated with the Jason data. Property ID and features are two of those fields. The single post page gets dynamically created with the property ID as the last part of the URL, the slug name. The repeating field is really unrelated to my problem, other than that being the only information this view shows.

#2341613

It is a repeating field group. The field is "features" with multiple instances.

#2342123

Minesh
Supporter

Languages: English (English )

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

Shane is on holiday today. Can you please share admin access details so we can review your current setup and guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2344679

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chuck,

Thank you for the login details, however they don't seem to work.

Can you check on them for me and let me know if they work for you ?

Thanks,
Shane

#2344699

My apologies... Please try again. It works now

#2344731

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chuck,

This should be working now.

I've added the Post ID filter to your view and then set the filter to get the ID from the shortcode parameter. Then I re-added your view to the page using this shortcode.

[wpv-view name='features' ids='[wpv-post-id]']


Please let me know if this helps.
Thanks,
Shane

#2344745

Awesome! Yes, that's what I needed. I tried that but obviously was missing some details

Thank you!

#2344831

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chuck,

Happy I was able to help you with this one.

If there are no further questions then you can go ahead and mark this ticket as resolved.

Thanks,
Shane

#2344833

My issue is resolved now. Thank you!