• I red documentation and most of the threads in this forum but can’t find out how you change date format. Mine always shows wordpress default.

    //Style for date:
    if($atts[‘date’]==’yes’){
    $lcp_output .= ‘<td>’ . get_the_time($atts[‘date_format’], $single).'</td>’;
    }

    I don’t understand how to config dateformat command and change it. Please help me, thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have also noticed that dateformat is broken in .13. It worked at .12. Looking at a diff I think I see the problem. There is a new function lcp_showdate($single) that does the work to show the date. However, this function does not have access to the $atts variable that it tries to use. I assume this code was copied from the old spot. I have updated the function to the code below and updated the function calls to match the new parameter. This change works for me.

    function lcp_showdate($single, $atts){
    	return  ' - ' . get_the_time($atts['dateformat'], $single);//by Verex, great idea!
    }
    Thread Starter aclime

    (@aclime)

    Thank you for help. I changed my template but It looks like theres more to change.

    I am getting error: Fatal error: Cannot redeclare lcp_showdate() (previously declared in /home/.../domains/.../public_html/.../wp-content/plugins/list-category-posts/list_cat_posts.php:170) in /home/.../domains/.../public_html/.../wp-content/themes/atahualpa/list-category-posts/docslist.php on line 50
    Can you tell me what is more needs to be changed?

    Plugin Author Fernando Briano

    (@fernandobt)

    Ooops, there was some refactoring on version 0.13 that broke the date. I’ll fix it asap. Thanks!

    Plugin Author Fernando Briano

    (@fernandobt)

    AcLime, the change YukataNinja is talking about should be done on the plugin itself, not the template. You can do that as a temporary fix while I roll a new version with a fix for this.

    Thanks!

    Thread Starter aclime

    (@aclime)

    When are you planning to release update? I really don’t understand what YukataNinja said. I changed in list_cat_posts.php now but still don’t work. Don’t know where to change date format… If I change in template don’t work, in list_cat_posts.php don’t work…

    Please fix and release asap.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: List category posts] How to change date format?’ is closed to new replies.