Loop is responsible for displaying information on a page based on the parameters set in the loop php code. These information can be contents or posts previews.
There are three important loops, “if”, “while” and “if while”. The “if” loop determines if there is a post and the format of the posts are determined by the PHP code between “while” is repeated.
I used the WordPress loop to customise the tags, categories, dates and images are displayed on my blogs preview page. I’ve also used it to add a “previous” and “next” section to my portfolio pages. This is so that viewers can navigate through them chronologically without having to return to the “portfolio gallery”. I didn’t have to change the loop php files, I modified options in the stockholm themes settings.
No Comments