Skip Navigation

[Closed] Query related posts by a custom field value

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

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

Assisted by: Luo Yang.

Author
Posts
#2522763

Hi there, since something delayed, I hadn't opened the sandbox on time for this ticket, the sandbox has been destoried. I tried to create the view based on the decription that Luo provided. However, something must be wrong, I was not able to duplicate the same view sucessfully. I promise, I will check the sandbox on time as soon you replied to me this time.
1. Can you please do the same thing again to me? reference this ticket https://toolset.com/forums/topic/query-related-posts-by-a-custom-field-value/
2. The Author id/ Author Email was passed as a post meta(custom field) and stored into database, can you please create a view for this situation, Current logged-in user as Author( author id is a custom field either wpcf-authorid or wpcf-authoremail), so that I can allow logged users to see the contents that was created by themself( themself defind by a custom fields wpcf-authorid or wpcf-authoremail) you may create another view in the same sandbox if you want.

I am so sorry I don't split this ticket because I consider that you may want to create both views in the same sanbox if possible.

Best

#2522917

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Here is a sandbox site again - you can auto-login to the site using the following link:
- hidden link

Can you please setup the post types, custom fields and post-relationship and add few posts and then I'm happy to share solution with you. In addition to that please setup the pages and let me know on what page/post you want to display what.

#2523425

Hi Minesh, thank you for response, unfortunately, it looks like not what I need. I have ever had a prvious ticket, Mr. Yang has helped me build a sandbox, but I am not able to check the sandbox in time. So, I would him or someone else dupulicate that sandbox if possible. Also I added another request in this thread. You may check it in the question item 2. Thanks

#2523531

Minesh
Supporter

Languages: English (English )

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

Can you please tell me how house ID you refer to. is "house-id" stored as custom field with rooms post type and the House ID will be the post ID of house post?

Or you can share screenshot of edit house post and room post that will help me to understand your structure and then I will setup the sandbox site for you.

#2523973

Hi Minesh, thank you for the quick response. You probably assign this ticket to Luo Yao. He has ever built a sandbox for me correctly last time, however, I was not able to check the sandbox in time before the sandbox got destroyed. just one additonal request which I mentioned in the first post in this thread. Thank you so much for sharing.

#2524279

Hello,

As your request, I have setup a same sandbox website. please check detail steps in your previous thread:
https://toolset.com/forums/topic/query-related-posts-by-a-custom-field-value/#post-2510185

Login URL:
hidden link

Single House posts:
hidden link
hidden link

For the new question: allow logged users to see the contents that was created by themself
Please check the new post view here:
hidden link
And result page:
hidden link

<p>Your email: [wpv-current-user info="email"]</p>
<p>Rooms related with your email:</p>
[wpv-view name='query-rooms-by-email' authoremail='[wpv-current-user info="email"]']

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-current-user

For your reference.

#2525209

Thank you so much for taking your time to build this sandbox for me. I am still checking it and will get back to you in case I have any question. Thank you so much again 🙂

#2526101

I have marked this thread as "Waiting for feedback" status, you can update here if you still need assistance for it.

The topic ‘[Closed] Query related posts by a custom field value’ is closed to new replies.