Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am not able to get the date to display for posts listed in a category using [catlist] tag. I use the parameter 'date=yes'. The time displays, but not the date. I have checked the list-category-posts/list_cat_posts.php and found the 'get_the_time' function, but cannot figure out how to get the date to display, not the time??

Please help.

share|improve this question

closed as off-topic by Mark Kaplun, Pieter Goosen, birgire, kaiser Dec 2 at 15:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

get_the_time() takes the same format as the PHP date() function for its parameter. Thus, get_the_time('F d, Y') would produce January 09, 2012 for today.

share|improve this answer
    
Thanks Joseph. I am using the category post plug-in by Fernando Briano. His code gets the date format form the wordpress installation configuration. e.g. return ' - ' . get_the_time($atts['dateformat'], $single); The problem is that it shows the time of the post not the date of the post. When I change the line to get_the_date it does not work at all. –  Russell Jan 10 '12 at 6:24

If you take a look at either the README file included on the plugin or in the plugin's page on WordPress.org, you can find this is one of the parameters:

dateformat - Format of the date output. Default is get_option('date_format'). Check http://codex.wordpress.org/Formatting_Date_and_Time for possible formats.

Try using this instead of hardcoding the format into the list_cat_posts.php file. This will be overwritten once the plugin is updated.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.