Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
All of the post types extend the class I mentioned above so I’m not sure you can “make a custom column and use the_time()”, unless you extend it and add functionality…
Just to clarify, you’re talking about this:
Sure you can. You can output any kind of content you want.
Theoretically you could make a column that outputs your latest tweets.
Yes, but with the latest version of WordPress.
AHhhhhhhh. Inside the admin area – thank you for the screenshot Alen, I was proper confused about the problem.
I’ll have a think and a play see if I can come up with a solution.
I got it.
Using the post_date_column_time filter.
add_filter( 'post_date_column_time', 'customize_date_column', 10, 4 );
function customize_date_column( $t_time, $post, $column_name, $mode ) {
$t_time = the_time('F j, Y');
return $t_time;
}
I was researching for legit 30min to find that filer… Good find.
Also, you could shorten the code little, you don;t need to pass all those arguments…
so something like this would work:
add_filter( 'post_date_column_time', 'customize_date_column', 10, 1 );
function customize_date_column( $t_time ) {
return $t_time = the_time('F j, Y');
}
Yeah, I’m still playing with it.
I might have to write up a blog post about this one.
You def should. WP needs better documentation.
No worries,
I’ve just always seen them called the admin tables. I thought that was the norm.