Can't get filter to work
-
Hi. I’v added this filter:
/** * Modify Admin Post Navigation to allow and disallow certain post statuses from being navigated. * * @param array $post_statuses Post statuses permitted for admin navigation. * @return array */ function change_apn_post_status( $post_statuses ) { // Adding a post status. $post_statuses[] = 'publish'; // Removing a post status. if ( isset( $post_statuses['draft'] ) ) { unset( $post_statuses['draft'] ); } return $post_statuses; } add_filter( 'c2c_admin_post_navigation_post_statuses', 'change_apn_post_status' );
to my theme’s functions file but it’s still navigating to posts that are drafts instead of published. Any help?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can't get filter to work’ is closed to new replies.