Yes, that's correct. Looking forward to your solution. Would it be beneficial to provide you with a zoom link if you had any questions? That way I can have an immediate response for you.
That seems to work, except we already have existing views set in place for the hazard products. Is there a way to incorporate what you've done into our existing views. I've done a quick recording about the views and the Major Hazard page: hidden link. hidden link
-The shortcode for the view is located in a Divi builder template so it won't require us to insert that shortcode into the post body.
Just wanted to note that everything from the Test Hazard Products view will be transferred over to the Hazard Products view, which we plan to use for future pages.
Yes there is as you can see there is a shortcode that was added to my test view.
All you need to do is to place this shortcode your existing view as well as setup the query filters from my test view in your actual view.
I called my test view in the post body with a shortcode parameter to pass the current hazard ID into the view.
This way it will filter for all the products with the same hazard id which will allow the custom shortcode to update the posts and setup the relationship.
Please let me know if this is clear or if further clarification is needed.
It works in connecting the posts. But hazard products (child posts) are no longer displayed in the view. hidden link
What else can I try? Are you able to check that I did everything per your recommendation?
I changed the static value to a dynamic value for the hazard parameter. We have our view shortcode in a Divi Theme Template which I added the dynamic hazard parameter. That didn't work in connecting the posts. I've tried placing your shortcode in the Divi Theme Template which connects the posts but it's pulling other posts that don't have the same hazard parameter.
I've tried using my view shortcode directly in the post body and that hasn't worked either. I'm noticing that the connecting of posts only works when I use your view and with it connected, it's still not displaying on the frontend for our view.
After the posts are connected you will need to refresh the page for your view to show up.
What you can do is to use my view to connect the posts. For my view you can actually delete the shortcodes that is used to display the data as this was just there as a test.
So you can add my view to your page but then you need to refresh the page after its first load in order to see the changes in your view.
I believe your view should just be pulling the child posts correct ? However from what I see here in the link below its not setup to pull the child posts through a post relationship. hidden link
I refreshed the page multiple times and did not get the view to show up.
The view initially was set up with the relationship filter shown below. I found that removing it allowed for the posts to be connected and displayed. I will re-instate the relationship filter to see if it will continue to connect and display the posts.
This is interfering with the normal operation of the view causing it to produce the incorrect result. This is causing my view here to give the incorrect results. hidden link
Whenever that code is active the view doesn't produce a result. So I would suggest doing a review of this code.
Even with the custom code removed, your code doesn't work with a relationship filter.
When I remove the relationship filter, your code works in connecting the posts except then the datepicker no longer works. That custom code was provided by Minesh to ensure that the datepicker works.
I am noticing that your code and Minesh's custom code works without the relationship filter. What other code changes can you recommend for the datepicker to work?
What i'm saying is that for this you will need to use 2 views.
The first view i.e the one I made will just be used to connect the posts, so you can remove all the output shortcodes from the content template and leave the custom shortcode I made.
The view that you made you can continue to use it as you normally do, remove any filter that is related to the customization from my view.
This way your view will display the updated information after the view that i've created connects the posts.
Please let me know if you understand this approach. The main issue is that you won't be able to combine all your current filters plus the filters that I use .
My view needs to only have the filter by the hazard ID which will allow you to connect all the posts with the same hazard ID.
You view will take care of all the other filters after the posts have been connected.
I understand the approach you mentioned. I have tried using the views per your approach but it is interfering with the formatting of the child posts if used separately from my view. Could you make the next response private so I can share a zoom link to show you what exactly is happening?
Your view requires that I apply the same formatting as my current view so it defeats the purpose of using them separately.
Your custom shortcode works in my view if the relationship filter is removed. Which leaves the datepicker issue. If I don't have that custom code active, the datepicker won't work. What do you recommend I add to your connect code to ensure the datepicker works?