Lyza Loop is a WordPress plugin that aims to:
There are two parts to the lyza_loop() function:
The unordered list above was created by using the following code:
<?php $args = Array('showposts' => 4, 'template' => 'simple_UL'); lyza_loop($args); ?>
This list was created with this code (the category with ID 3 is my “Books” category):
<?php $args = Array('showposts' => 3, 'template' => 'simple_UL', 'cat' => 3); lyza_loop($args); ?>
Although the last post in the first list (“This Sceptered Isle”) is in my “Books” category, I have Lyza Loop configured not to repeat posts.
These two examples both use the ’simple_UL’ loop template (which is a default template I bundle in with the plugin). This template is a PHP file that looks like this:
<?php if($loop_first): ?> <ul> <?php endif; ?> <li id="post_link_<?php the_ID(); ?>" <?php post_class(); ?>> <?php the_time('M j'); ?> <a href="<?php the_permalink(); ?>" title="Read <?php the_title(); ?>"> <?php the_title(); ?> </a> </li> <?php if($loop_last): ?> </ul> <?php endif; ?>