Add Setting Page To Custom Post Type

2014-09-13 07_41_27-Radio Player Streaming & Stats ‹ Radio Rodja 756 AM — WordPress

add_action('admin_menu' , 'add_settings_page');

function add_settings_page() {
add_submenu_page('edit.php?post_type=custom', 'Custom Post Type Admin', 'Custom Settings', 'edit_posts', basename(__FILE__), 'setting_page');
}

edit.php?post_type=custom

Here where you want to add custom menu to your custom post type. Change custom to your custom post type slug

Custom Post Type Admin

Change Custom Post Type Admin to what ever you want, it’s will be the page title of your settings page in the browser.

Custom Settings

Change Custom Settings for name of menu that you want to display under your custom post type. In my case, I only give Settings name, look picture above.

Setting Page

Here where you change for custom function of your setting page.

Artikel terkait:   BitNami Add-ons for XAMPP : WordPress, Drupal, Joomla! and more

Isi Komentar

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

This site uses Akismet to reduce spam. Learn how your comment data is processed.