I know this is not really a coding question but here goes. So is it possible to add a link to the WordPress Admin Sidebar that links to a New Post page that is automatically categorized as a category "team"?

I can add the sidebar link easily with this code

add_action( 'admin_menu', 'register_team_page' );
function register_team_page(){
    add_menu_page( 'Team Menu Title', 'Team menu', 'publish_posts', '#link-goes-here', '', "", 6 );

I am trying to figure out how to properly link to a New Posts page with the category "team" preselected.

  • possible duplicate of Adding an Arbitrary Link to the Admin Menu?
    – s_ha_dum
    Commented Jun 24, 2013 at 16:55
  • ^^ The solution by @t3los is the one want I believe : wordpress.stackexchange.com/a/3831/21376
    – s_ha_dum
    Commented Jun 24, 2013 at 16:56
  • No. The code I posted above does essentially the same thing and is able to add a link to the admin menu. I am trying to figure how to make that link take you a new page with a category pre-selected.
    – mirza
    Commented Jun 24, 2013 at 17:03
  • I don't believe the two are entirely equivalent and the approach in the other question strikes me as the better way to proceed.
    – s_ha_dum
    Commented Jun 24, 2013 at 19:12

1 Answer 1


So show all posts in one category I can do something like this


Replace the category_id_number with the ID number of the category like 3.

But not sure for the new page link

  • 1
    this is not an answer, edit your question to add additional information.
    – Milo
    Commented Jun 24, 2013 at 17:58

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.