Skip to content

Instantly share code, notes, and snippets.

View raddougall's full-sized avatar

Rad Dougall raddougall

View GitHub Profile
@martijn94
martijn94 / wp-admin-add-posts-state.php
Last active May 2, 2023 04:43
Snippet to add post state to a WordPress page
<?php
//======================================================================
// Add post state to the projects page
//======================================================================
add_filter( 'display_post_states', 'ecs_add_post_state', 10, 2 );
function ecs_add_post_state( $post_states, $post ) {