0

This seems like a simple thing to do, but I haven't been able to figure it out. What I'd like to do is add the time a post is scheduled to the date stamp on the list of posts. I know this means modifying the columns, and there's a way to do it that seems fairly simple. Has anyone done this, and can you suggest some code?

1 Answer 1

2

Try this:

add_filter('manage_posts_columns', 'posts_columns', 5);
add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2);
function posts_columns($defaults){
    $defaults['your_date_col'] = __('Date');
    return $defaults;
}
function posts_custom_columns($column_name, $id){
    if($column_name === 'your_date_col'){
        echo the_date();
    }
}
1
  • Fantastic, works like a charm. Posted a followup question. Jun 3, 2011 at 19:42

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.