In this episode, you’ll finish building the loop code to render out each FAQ. We’ll use the same FAQ view file. Therefore, we need to keep the variables named the same. Since we are in the loop and we setup the post within WordPress Core, i.e. when we did $query->the_post(), we can use the API wrapper functions, such as get_the_title() and get_the_content(). Then we need to order the FAQs by the menu order. We’ll set both the order and orderby parameters. To finish up, let’s document our code now by adding the DocBlocks. We’ll also type hint the function parameters […]
