2015-06-03 4 views
0

Я создаю пользовательский тип сообщения в wordpress. но я также хочу показать цитирование и изображение в форматах сообщений. где я выбираю цитату или изображение в формате post. это мой пользовательский код типа сообщения!Как показать форматы сообщений в пользовательских типах сообщений?

function Quotes_sky() { 
    $labels = array(
     'name'    => _x('Quotes', 'post type general name', 'your-plugin-textdomain'), 
     'singular_name'  => _x('Quote', 'post type singular name', 'your-plugin-textdomain'), 
     'menu_name'   => _x('Quotes', 'admin menu', 'your-plugin-textdomain'), 
     'name_admin_bar'  => _x('Quote', 'add new on admin bar', 'your-plugin-textdomain'), 
     'add_new'   => _x('Add New', 'Quote', 'your-plugin-textdomain'), 
     'add_new_item'  => __('Add New Quote', 'your-plugin-textdomain'), 
     'new_item'   => __('New Quote', 'your-plugin-textdomain'), 
     'edit_item'   => __('Edit Quote', 'your-plugin-textdomain'), 
     'view_item'   => __('View Quote', 'your-plugin-textdomain'), 
     'all_items'   => __('All Quotes', 'your-plugin-textdomain'), 
     'search_items'  => __('Search Quotes', 'your-plugin-textdomain'), 
     'parent_item_colon' => __('Parent Quotes:', 'your-plugin-textdomain'), 
     'not_found'   => __('No Quotes found.', 'your-plugin-textdomain'), 
     'not_found_in_trash' => __('No Quotes found in Trash.', 'your-plugin-textdomain') 
    ); 

    $args = array(
     'labels'    => $labels, 
     'public'    => true, 
     'publicly_queryable' => true, 
     'show_ui'   => true, 
     'show_in_menu'  => true, 
     'query_var'   => true, 
     'rewrite'   => array('slug' => 'Quotes'), 
     'capability_type' => 'post', 
     'has_archive'  => true, 
     'hierarchical'  => false, 
     'menu_position'  => 5, 
     'menu_icon'   => 'dashicons-editor-quote', 
     'supports'   => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments') , 
     'taxonomies'   => array ('category', 'post_tag') 

     ); 

    register_post_type('Quotes Sky', $args); 
} 

Это краткий экран. Может ли это полезно для понимания моего вопроса

enter image description here

ответ

0

«пост-форматы» нужно добавить в «поддержке» .. может быть halpful

'supports'   => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'post-formats') 
+0

Спасибо ... это работает :) –

+0

у приветствую..и также получаю мои знания – vrajesh

+0

, пожалуйста, сделайте мой ответ как решение тика рядом с моим ответом thx ... – vrajesh

Смежные вопросы