Join Morten Rand-Hendriksen for an in-depth discussion in this video Using custom queries to display content from different pages, part of WordPress: Building a One-Page Style Site.
…With all the pages and…their content in place, we're ready to pull that content into the front page.…And this is possible because we are using WordPress, and…WordPress is a content management system.…You see, when you create a page,…like Book an Appointment, you're not actually creating this entire page.…What you're doing is taking some text contents, and putting it into a database.…And in WordPress, we'll retrieve that data, and…put it onto a page when you request it, by visiting that individual page.…
And because all that data is on a database,…we can request that data from any other page, if we want to.…So, by default, the data for…book an appointment only displays on the page, Book an Appointment.…But we can create a custom query that goes to the database and says.…And I have the content from Book an Appointment and display it here, as well.…And then the database will just return that content and display it.…So, what we're going to do now is go to our front page template, and…replace the dummy content for…
- 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