i am trying get day month and year of a post from WP post object.

what i did is:

        echo $cpost->post_date;echo "<br>";


    2013-12-26 13:25:18

what i need is, day month and year as:

   26 Dec 2013

Try it like this:

echo get_the_time('j M Y', $_GET['p_id']);


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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