Add menu option to “New Post” menu in admin bar

Use new-content : function make_parent_node($wp_admin_bar) { $args = array( ‘id’ => ‘test1234’, // id of the existing child node (New > Post) ‘title’ => ‘test’, // alter the title of existing node ‘parent’ => ‘new-content’, // set parent to false to make it a top level (parent) node ‘href’ => admin_url(‘admin.php?page=enter_timesheet’) ); $wp_admin_bar->add_node($args); } it … Read more

views_edit-post filter not working (custom post type)

I finally figured this out. What I had above is correct, as far as it goes. But the missing piece was changing the query based on that. So in addition, I needed to add the following code: add_filter( ‘parse_query’,’norelated_filter’ ); function norelated_filter( $query ) { if( is_admin() AND $query->query[‘post_type’] == ‘my-cpt’ ) { if ($_GET[‘norelated’]) … Read more