Join Morten Rand-Hendriksen for an in-depth discussion in this video Creating a custom testimonials loop, part of WordPress: Building a One-Page Style Site.
…All right, at this point we have four testimonials of which we want to…display three on the front page in random order.…Of course, once we get more testimonials, we still want it to run at random.…But on the front page we only want to display three.…Previously in the course we've created several queries that have pulled in…content from the database and displayed it.…And we've also created a custom query that displays a set number of…items from the database and even on older lists.…This is what you see here under the services path.…So you've already seen all the pieces you need to make this work for…testimonials as well.…
The only thing we need to do different from what we've already done previously in…the course is we need to tell WordPress we want three posts from a specific category.…In our case, the testimonials category.…And we want to display them in random order.…All of this is done the same way we did before with a custom wp query.…So here I'm going to go to my testimonial section and set up a new custom wp query.…
- 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