Join Morten Rand-Hendriksen for an in-depth discussion in this video Using a custom loop to retrieve Services page children, part of WordPress: Building a One-Page Style Site.
…In the previous movie we created a set of custom queries that went to the database…and retrieved the data for individual pages and displayed them together on…the front page, and you'll remember that in my front page I wanted to display…the Services page and then an unordered list of each of the individual services…underneath within the services section, and that's what I'm going to do now.…You'll remember when we set up the services page, that I set up…one page called services, and then I created an individual page for each of…the services and made the services page, the parent of those individual services.…
That means from the data base,…I can now say, here is the ID that has the services page.…Can you give me all of the children of that ID?…Inside frontpage.php I already have the services section set out and…within the services section, I made a query to get the services page,…it's right here and it's contained within the variable called clarity.…Now I can create a new variable called services ID and…
- Creating a foundation for the front page with a child theme, styles, and dummy content
- Using custom queries to display content from different pages
- Adding testimonials
- Adding a custom menu
- Creating a scrolling effect