2014-01-17 3 views
0

내가사용자 관리 화면이

add_action('init', 'create_sidebarone'); 

function create_sidebarone() { 
    register_post_type('sidebarone', 
     array(
      'labels' => array(
       'name' => 'Sidebar One', 
       'singular_name' => 'sidebarone', 
       'add_new' => 'Add New', 
       'add_new_item' => 'Add Sidebar One', 
       'edit' => 'Edit', 
       'edit_item' => 'Edit Sidebar One', 
       'new_item' => 'New Sidebar One', 
       'view' => 'View', 
       'view_item' => 'View Sidebar One', 
       'search_items' => 'Search Sidebar One', 
       'not_found' => 'No Sidebar One found', 
       'not_found_in_trash' => 'No Sidebar One found in Trash', 
       'parent' => 'Parent Sidebar One' 
      ), 
      'public' => true, 
      'menu_position' => 15, 
      'supports' => array('title', 'editor', 'comments', 'thumbnail'), 
      'taxonomies' => array(''), 
      'menu_icon' => get_template_directory_uri() . '/images/ggicon.png', 
      'has_archive' => true 
     ) 
    ); 
} 

가 지금은 내 요구를 충족하기 위해 뭔가를 달성하고자하는 사용자 정의 포스트 유형을 만들기위한이 코드가 워드 프레스, 나는 사용자 관리 화면이나 설정 페이지를 만들려면 아래 이미지를 참조하시기 바랍니다 내 사용자 지정 게시 유형, 정확히 말하면이 내가 지금 regular custom post type

위의 코드에서 생성 한 사용자 정의 포스트 형식의 그림

이다, 나는를 사용자 정의 할 관리자 화면 또는 아래 그림과 같은 해당 게시물 유형의 설정 화면 :

enter image description here 이제 알 수 있듯이 해당 관리 유형 또는 해당 게시물 유형의 설정 화면이 맞춤 설정되었습니다. (두 번째 이미지는 무엇을 성취하려고 시도했는지, 이미지 편집을 가정 한 것입니다.)

지금까지 시도한 것은 위의 코드에서 첫 번째 이미지의 포스트 유형 기본입니다. 누구든지, 제안, 권장 사항 및 아이디어가 열려 있습니다. 미리 감사드립니다.

답변

0

링크 가이드에서 가져온 예를 wordpress.org

주에서 this guide를 수행하여 plugin 다음 사용자가 만들 수있는 관리 패널을 생성하는 것이 작업을 수행하는 가장 좋은 방법 :

<?php 
/** Step 2 (from text above). */ 
add_action('admin_menu', 'my_plugin_menu'); 

/** Step 1. */ 
function my_plugin_menu() { 
    add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options'); 
} 

/** Step 3. */ 
function my_plugin_options() { 
    if (!current_user_can('manage_options')) { 
     wp_die(__('You do not have sufficient permissions to access this page.' )); 
    } 
    echo '<div class="wrap">'; 
    echo '<p>Here is where the form would go if I actually had options.</p>'; 
    echo '</div>'; 
} 
?> 
+0

야호 오른쪽 ! 감사 –