C
C
c0smo2014-06-06 10:53:58
CMS
c0smo, 2014-06-06 10:53:58

How to display a new item "News" in the wordpress admin panel and show all the posts of a specific category "News" in it?

How to display a new item "News" in the wordpress admin panel and show all the posts of a specific category "News" in it, that is, with the ability to edit adding, as it were, a copy of the Posts item, only everything is in a heap ... how to add an item, I found an example).
So I add item ()
add_action( 'admin_menu', 'register_my_page' );
function register_my_page(){
add_menu_page( 'news Title', 'news', 'edit_others_posts', 'my_page_slug', 'my_page_function', plugins_url( 'myplugin/images/icon.png' ), 6 );
}
function my_page_function(){
echo "Admin Page Test - this is a snippet on the item page";
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2014-06-06
@ghost1k

add a menu item with a link your_url/wp-admin/edit.php?category_name=category_name
how to add a link, you can probably guess.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question