Hi ,
I am trying to create a navigation within a CPT as a unordered list like this:
CPT- holiday period
Holiday Period A (A)
- Holiday period A- Region1 (A1)
- Holiday period A- Region2 (A2)
- Holiday period A- Region3 (A3 )
Holiday Period B (B)
- Holiday period B- Region1 (B1)
- Holiday period B -Region2 (B2)
- Holiday period B- Region3 (B3 )
Within all the A pages I am trying to create the unordered list with all the page titles with a link to all the A items.
For B the same but also only to the B items.
I have set up a content template with te page title witjh link. I have outputted this in a view in the template of the CPT- holiday period . The view is filtered with the setting: "Select posts whose parent is the page where the View is shown."
But this only outputs the subpages on the A level page.
On the A1- level nothong is shown
hidden link
hidden link
I have tried to understand the information on:
https://toolset.com/documentation/legacy-features/views-plugin/displaying-brother-pages/
But this is hard to understand.
Can you tell me what I am doing wrong?
Kind reagards
Edwin
Hello,
Yes, you are referring the correct document:
https://toolset.com/documentation/legacy-features/views-plugin/displaying-brother-pages/
I think you missed those two steps:
- Create a Content Template for the parent page
- Display the parent Content Template in the child Content Template
If you need more assistance for it, please provide a test site with the same problem, I can setup a demo for you
Your website isn't in English, please point out the problem post URL and view URL, thanks
Sorry,
In de admin the CPT is called "Dagjes weg" I have created the following posts with subpages
hidden link (title:Dagje weg zomervakantie) > link to subpages is shown
On these pages the brother pages do not show :
hidden link
(title: Dagje weg zomervakantie Zeeland)
hidden link
(title: Dagje weg zomervakantie Limburg)
I am using this content template for this CPT:
hidden link
I am using the "navdw" view there to show the "Themanav" Content Template.
Thanks.
Edwin
Thanks for the details, I can login into your website.
Please check these:
1) In the "Dagjes weg" post lists:
hidden link
There are only two pages have parent page:
- Dagje weg zomervakantie Limburg
- agje weg zomervakantie Zeeland
Both of them have the same parent page:
Dagje weg zomervakantie
So the broth pages feature only works in above two child pages
2) I have done below modifications in your website:
a) Create a post view "brother pages":
hidden link
- Query "Dagjes weg" posts
- Filter by:
Select posts whose parent is the current post in the loop.
- In view's loop, display the post link shortcode
b) Create a content template "parent-page-information":
hidden link
display above post view's shortcode:
[wpv-view name="brother-pages"]
c) Edit the content template of single "Dagjes weg" post:
hidden link
Replace the view block with a shortcode block, and display above content template shortcode with item="$parent" attribute:
[wpv-post-body view_template="parent-page-information" item="$parent"]
Test it in front-end:
hidden link
hidden link
It works fine, please check if it is what you want. thanks
Thanks,
I can finetune it with this info.