Simple single "loop.php" Word Press theme function


/ Published in: PHP
Save to your folder(s)

Instead of requiring the loop.php file in your custom themes you can use there two functions, placed in your functions.php file to not only automatically include it, but make a dead simple to filter sections out on a page by page basis negating the need for special loops for specific page types (like a search loop or a main index loop)

The first section is the code you put into your functions file.

The second is how you would call the new "the_loop()" function, simple but all the individual sections you want filtered out as variables, one after another.

The third sections is how you would go about filtering items out.

More information at the link, questions or comments can be posted here or there and I'll get back to you whenever I can.

URL: http://fatfolderdesign.com/308/unimportant/simpler-single-loop-wordpress-theme-creation

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.