Home › Toolset Professional Support › [Resolved] Split: need help , very complicated – Showing judge's information
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.
This topic is split from https://toolset.com/forums/topic/need-help-very-complicated/
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/Karachi (GMT+05:00)
Tagged: Post-relationship
This topic contains 19 replies, has 2 voices.
Last updated by martinP-13 5 years, 11 months ago.
Assisted by: Waqar.
waqar i have accomplished number 3 above , i was adding the display in views i simply need to add fields to the dog post content.......
i want to display who was the judge at an event now ,i really have tried everything for this.....
this event here hidden link
i want to show who the judges where (next to event) here hidden link
i tried everything... the judges need to be clickable.
itried
a[types field='judge-panel-proper'][/types]
b[types field='judge-panel-proper' item='$current_page'][/types]
c[types field='dog-breed' item='$current_page'][/types]
d[types field='judge-panel-proper' item='$parent'][/types]
e[types field='judge-panel-proper' item='@events-dog.parent'][/types]
f[types field='judge-panel-proper' item='@events-dog.child'][/types]
g[types field='judge-panel-proper' item='@events-dog.intermediary'][/types]
h[types field='judge-panel-proper' item='@events-judge.parent'][/types]
i[types field='select-7e0ad2ec' item='@events-judge.child'][/types]
j[types field='judge-panel-proper' item='@events-judge.intermediary'][/types]
k[types field='judge-panel-proper' item='@dog-judge.parent'][/types]
l[types field='judge-panel-proper' item='@dog-judge.child'][/types]
m[types field='judge-panel-proper' item='@dog-judge.intermediary'][/types]
none worked
thank you for splitting ,the other 2 are fixed ,very easy for once! , this is the important one ,i have many to set up very similar so could you please supply some detailed assistance. if i can understand this then i can complete on my own i think.
thanks waqar
Hi Martin,
I noticed that you've successfully managed to show the related judges information on the single event pages:
hidden link
( screenshot: hidden link )
The requirement of showing related judges and participating dogs on a single event page was very similar. But in order to show the judges information with each event, on the single dog page ( e.g. hidden link), steps would be slightly different.
Note: The judges and dogs need to have a direct relationship with an event, but this isn't required between judges and dogs. Your website includes a relationship between "Dogs" & "Judges" custom post type, but you can remove it and still show information about each other on their respective pages.
Your first step of creating a view "View to show all events related to adog" ( hidden link ) is correct. I'll only recommend two changes:
1. You only need to keep "Events Dogs Intermediary Posts" checked in that view's "Content Selection" section.
( screenshot: hidden link )
2. In the "Query Filter" section, change the query option from "in any relationship" to "in the Events Dogs relationship".
( screenshot: hidden link )
Now that you'll have the information about all the events in which the current dog has participated ( screenshot: hidden link ), the next step would be getting the judges information, for those events:
1. You'll need a view that will get all the "Events Judges Intermediary Posts" which are related to the current event in the view "View to show all events related to adog".
2. I've set it up an example view "View to show judges from an event - child":
hidden link
3. This view is very similar to your already created view "judge on events", but the only difference is that we'll need to specify the source from which we need to get the related posts.
4. In the "Query Filter" setting of this view, note how I've set to show only those posts, which are related to events, which are passed on as a shortcode attribute "wpvrelatedto".
( screenshot: hidden link )
5. As the last step, I've nested this new view, inside the parent view "View to show all events related to adog", by passing the value of the current event's ID, as a shortcode attribute "wpvrelatedto".
( screenshot: hidden link )
You can learn more about nesting views into each other, from this guide:
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/
I hope this helps.
regards,
Waqar
thankou waqar , i see that here hidden link now displays 3 relaveted events , how ever the related details are only shown for 1 event.
sorry i hadnt set judges to events.....
how can i make its hidden link uses a different template from my theme?(along with all dog posts)
New threads created by Waqar and linked to this one are listed below:
Hi Martin,
Thanks for the update and glad the judge's information is sorted out.
Since the question about template assignment is unrelated to this thread, I've split it as a new ticket.
( ref: https://toolset.com/forums/topic/split-split-need-help-very-complicated-using-a-different-template-than-theme/ )
I'd like to remind you again to open a new ticket for each new question/concern.
regards,
Waqar
thx waqar , thanks for the example. still not getting a bit though
i have created a new post type names stake, i have that displaying fine on hidden link
on dog page hidden link I AM trying to add the STAKE
i have it displaying but it isnt correct it lists all at top rather than each within itsownevents
i followed youinstructions, but imconfused,
when i get to loop editor what are the EXACT steps?
also above your number 5 im lost!! could you also provide EXACT steps?
i have many to do like this and am very close to understanding i feel!!!
thanks ever so much for all your help and patience
martin
any chance of the missing steps waqar? i have a lot do and running out of time !! also the example you show in the screen shots doesn't look like the example o my site you created which also doesn't help with my confusion
now i must wait another 18 hrs for a reply? ill close this and start a fresh ticket
Hi Martin,
I'm working on a reply to your questions in this thread, which will be ready shortly.
Thank you for your patience.
regards,
Waqar
Hi Martin,
Reading through your most recent messages, I feel that the approach that I've been following till now of creating example views for you is not contributing much to your own learning experience around the views. I apologize for that.
From now on let's try a different approach and strictly focus on what steps you took, what were the expected results and what actually happened.
The current requirement of showing the stake on the dog page is very similar to what we covered when we wanted to show judges on the dog page ( ref:https://toolset.com/forums/topic/split-need-help-very-complicated-showing-judges-information/#post-1188041 )
Recaping as an overview, we wanted:
Dog -> Events -> Judges
So we first created a view "View to show all events related to adog", to get the events related to the current dog.
And inside the loop/list of that view, we included another view "View to show judges from an event - child", which would get the judges information related to the current event post.
The current requirement's overview is:
Dog -> Events -> Stakes
I've noticed that you've created a new view "View to show stakes within dog" that is set to show "Stakes Events Intermediary Posts". But this won't work, because we first only need to get the events related to the current dog.
A simple way would be to:
1. make a duplicate of your view "View to show all events related to adog" and name the new view something similar to "View to show all events related to a dog for Stakes".
2. next make a duplicate of your view "View to show judges from an event - child" and name the new view something similar to "View to show stakes from an event - child"
3. In this view's "Content Selection" settings, you'll uncheck the option for the "Events Judges Intermediary Posts" and will only select the option "Stakes Events Intermediary Posts", because this new view will be used to get the stakes information and not the judges.
4. In the "Query Filter" section, you'll also change the relationship field to have "Stakes Events" relationship and then update the contents in the template part of the view.
> also above your number 5 im lost!! could you also provide EXACT steps?
- All the steps and screenshots that were shared in my last message were from your website. Here is how I created the shortcode to nest the child view into the child view (step 5).
1. This is how your parent view's ( "View to show all events related to adog" ) content template was before the child view was added inside it:
hidden link
2. I kept the cursor, where I wanted to insert the child view and clicked the "Fields and Views" button.
hidden link
3. From the modal window, I selected the view that I wanted to insert.
hidden link
hidden link
4. As a result, the following shortcode was added to the content template:
hidden link
[wpv-view name="view-to-show-judges-from-an-event-child"]
5. But in this case, I didn't want any judges, but only those which are related to the current event and for this I needed that event's ID.
So I clicked the "Fields and Views" button again and selected "Post ID".
hidden link
6. On the next screen, I specified, that I didn't actually need the ID of the current post in the loop (because it would be the ID of the current "Events Dogs Intermediary Posts"), but would want the ID of the event from the "Events Dog" relationship.
hidden link
7. This gave me another shortcode in the content template section:
hidden link
[wpv-post-id item="@events-dog.parent"]
8. Next, I copied the shortcode attribute "wpvrelatedto" from the child view "View to show judges from an event - child", which was set in it's query filter settings.
hidden link
9. Using that shortcode attribute value, I combined the view's and post ID's shortcode, as one:
hidden link
[wpv-view name="view-to-show-judges-from-an-event-child"] + [wpv-post-id item="@events-dog.parent"] [wpv-view name="view-to-show-judges-from-an-event-child" wpvrelatedto="[wpv-post-id item='@events-dog.parent']"]
We have a guide on passing the arguments to view's shortcode at:
https://toolset.com/documentation/user-guides/passing-arguments-to-views/
I hope this will make more sense now.
regards,
Waqar
thankyou waqar i will try to do it later!! many many thanks
ITS AS CLEAR AS MUD!!!!
im in the same position i was last night ,
??????
3. In this view's "Content Selection" settings, you'll uncheck the option for the "Events Judges Intermediary Posts" and will only select the option "Stakes Events Intermediary Posts", because this new view will be used to get the stakes information and not the judges.
**** WHICH VIEW DO YOU NOW REFER? I PRESUME "View to show stakes from an event - child"******
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4. In the "Query Filter" section, you'll also change the relationship field to have "Stakes Events" relationship and then update the contents in the template part of the view.
THE QUERY FILTER IS
IN THE STAKES EVENTS RELATIONSHIP
The post with ID set by the shortcode attribute = wpvrelatedto
(SO WE CAN GET FROM THIS VIEW FROM THE PARENT VIA SHORT CODE)?
IN THE Templates for this View SECTION I WOULD NOW
A) I WOULD NOW CLICK FIELD AND VIEWS , SELECT Field Group for Stakes : STAKE AND SELECT
The current post being displayed either directly or in a View loop
B) I WOULD NOW CLICK FIELD AND VIEWS , POST TITLE WITH LINKS, POST SELECTION ,A post related to the current post, set by a Types relationship, AND SELECT EVENTS UNDER Stakes Events (many-to-many relationship)
GIVING ME THIS hidden link
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WE ARE NOW WORKING ON THE PARENT VIIEW ? IE View to show all events related to a dog for Stakes???????
> also above your number 5 im lost!! could you also provide EXACT steps?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
also confused what shorcode to enter here hidden link to display all the info in one rather than repeated on the actual dog page view
i followed thee instruction but alas no joy ?? i must be missing something very simple? could it be because i have no reltionhips set for stake ? i need tissues to cry into!! thanks again waqar
Hi Martin,
Thank you for sharing your questions.
Note: My replies start with a "-".
3. In this view's "Content Selection" settings, you'll uncheck the option for the "Events Judges Intermediary Posts" and will only select the option "Stakes Events Intermediary Posts", because this new view will be used to get the stakes information and not the judges.
**** WHICH VIEW DO YOU NOW REFER? I PRESUME "View to show stakes from an event - child"******
- Your understanding is correct and I was referring to the "View to show stake from an event - child".
hidden link
I can also confirm that all steps from step 1-4 (first set) have been completed successfully - well done.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4. In the "Query Filter" section, you'll also change the relationship field to have "Stakes Events" relationship and then update the contents in the template part of the view.
THE QUERY FILTER IS
IN THE STAKES EVENTS RELATIONSHIP
The post with ID set by the shortcode attribute = wpvrelatedto
(SO WE CAN GET FROM THIS VIEW FROM THE PARENT VIA SHORT CODE)?
IN THE Templates for this View SECTION I WOULD NOW
A) I WOULD NOW CLICK FIELD AND VIEWS , SELECT Field Group for Stakes : STAKE AND SELECT
The current post being displayed either directly or in a View loop
B) I WOULD NOW CLICK FIELD AND VIEWS , POST TITLE WITH LINKS, POST SELECTION ,A post related to the current post, set by a Types relationship, AND SELECT EVENTS UNDER Stakes Events (many-to-many relationship)
GIVING ME THIS hidden link
- You've followed all the steps related to this correctly and the child view ( View to show stake from an event - child ), in now correctly setup.
Important note: This view was not showing any results because it was set to order by a "Stake" field, which is not available for the "Stakes Events Intermediary Posts".
( screenshot: hidden link )
I've changed it to order by title and it is now showing the results correctly.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WE ARE NOW WORKING ON THE PARENT VIIEW ? IE View to show all events related to a dog for Stakes???????
> also above your number 5 im lost!! could you also provide EXACT steps?
- You'll need to add the following changes into your parent view "View to show all events related to a dog for Stakes":
hidden link
1. You don't need the shortcode "[wpv-view name="view-to-show-judges-from-an-event-child" wpvrelatedto="[wpv-post-id item='@events-dog.parent']"]" in the content template of this view
2. You can't use the "Stake" ( [types field='stake'][/types] ) custom field value in this view's content template, because this field is being used for the post type "Stakes", whereas this view is for post type "Events Dogs Intermediary Posts".
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I hope these answers will clarify things further.
regards,
Waqar
many thanks waqar!!
i attatch a screen shot hopefully explaining , i think im really begining to understand now FINALY !! once i have this displayed properly i think that i can accomplish what i need for my other stuff.