add files
This commit is contained in:
20
yarpp-template-list.php
Normal file
20
yarpp-template-list.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
YARPP Template: List
|
||||
Description: This template returns the related posts as a comma-separated list.
|
||||
Author: mitcho (Michael Yoshitaka Erlewine)
|
||||
*/
|
||||
?><h3>Related Posts</h3>
|
||||
|
||||
<?php if (have_posts()):
|
||||
$postsArray = array();
|
||||
while (have_posts()) : the_post();
|
||||
$postsArray[] = '<a href="'.get_permalink().'" rel="bookmark">'.get_the_title().'</a><!-- ('.get_the_score().')-->';
|
||||
endwhile;
|
||||
|
||||
echo implode(', '."\n",$postsArray); // print out a list of the related items, separated by commas
|
||||
|
||||
else:?>
|
||||
|
||||
<p>No related posts.</p>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user