0

Is it possible to hide the 'Published' word only on custom post types column? as in image and just leave the date and time?

enter image description here

1 Answer 1

0

WordPress has a filter for that..

function wpse406965_remove_status( $status, $post, $column_name, $mode ) {
    
    //Get the post type. Replace YOUR_CPT with your CPT slug.
    if ( $post->post_type == 'YOUR_CPT' ) {
        return false;
    }
    return $status;
}
add_filter( 'post_date_column_status', 'wpse406965_remove_status', 10, 4);
3
  • Hello Abhik Perfect that worked excellent :) Commented Jun 21, 2022 at 11:53
  • @jamesnelson82 could you please accept this as the answer? Will be helpful for future visitors to find it.
    – Abhik
    Commented Jun 21, 2022 at 11:54
  • hey Abhik I just have thank you could you take a look at this please wordpress.stackexchange.com/questions/406970/… Commented Jun 21, 2022 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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