Wordpress developer12/5/2023 ![]() The message must be placed between the endwhile and endif statements, as seen in examples below.Īn extremely simple index.php file would look like: Tip: You can include a custom 404 “not found” message that will be displayed if no posts matching the specified criteria are available. The Loop must always begin with the same if and while statements, as mentioned above and must end with the same end statements.Īny template tags that you wish to apply to all posts must exist between the beginning and ending statements. In the above example, the end of the Loop is shown with an endwhile and endif. Because you do not want to duplicate your header over and over, the loop should always be placed after the call to get_header(). The Loop should be placed in index.php, and in any other templates which are used to display post information. As long as have_posts() continues to be true, the loop will continue.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |