pagecarver
Member
Posted 3 years ago #
What is the code for getting RECENT COMMENTS to your sidebar?
For CATEGORIES, I found that it is:
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
How about for RECENT COMMENTS? I don't want to use widgets when inserting RECENT COMMENTS in my sidebar. I need to know the PHP code.
Hi pagecarver,
as per my knowledge their is no template tag available for getting most recent comments.
her what you can do is inclue php file from simple_recent_coments
(http://www.g-loaded.eu/2006/01/15/simple-recent-comments-wordpress-plugin/) in your theme and use below php code any where
<?php include (TEMPLATEPATH . '/simple_recent_comments.php'); /* recent comments plugin by: http://www.g-loaded.eu */?>
<?php if (function_exists('src_simple_recent_comments')) { src_simple_recent_comments(5, 60, '', ''); } ?>
to get most rcent comments.