Getting grandchildren of a page given grandfather cID
Permalink
Hopefully that subject makes sense. It was strange to word. Basically what I'm wanting to do, is given a great-grandfather cID, is find all great-grandchildren through PageList.
I have my news structured as follows. There are multiple sections, within which has multiple years of publishing, each which have 12 months of publishing.
- News Section
- - Year published
- - - Month published
- - - - News Article
I am wanting to list all news articles within a news section. However, in PageList filterByParentID is only specific to direct parent. filterByPath can include all children, not only direct, but I wanted to check there wasn't a better solution before using that.
A little context that might allow something I'm missing:
* All News Sections are children of a static page which I'll have the ID for under $this->newsSectionID.
* All "Year published" and "Month published" pages has unique PT handles "news_date_article".
* All News articles have a unique PT handle "news_article"
I have my news structured as follows. There are multiple sections, within which has multiple years of publishing, each which have 12 months of publishing.
- News Section
- - Year published
- - - Month published
- - - - News Article
I am wanting to list all news articles within a news section. However, in PageList filterByParentID is only specific to direct parent. filterByPath can include all children, not only direct, but I wanted to check there wasn't a better solution before using that.
A little context that might allow something I'm missing:
* All News Sections are children of a static page which I'll have the ID for under $this->newsSectionID.
* All "Year published" and "Month published" pages has unique PT handles "news_date_article".
* All News articles have a unique PT handle "news_article"