Answer the question
In order to leave comments, you need to log in
How to get custom post type id?
Hello, I need to get the id of a custom type post by url. The record type is written like this:
register_post_type('uslugi', array(
'labels' => array(
'name' => '', // Основное название типа записи
'singular_name' => '', // отдельное название записи типа Book
'add_new' => ' новую',
'add_new_item' => 'новую ',
'edit_item' => 'Редактировать ',
'new_item' => 'Новая ',
'view_item' => 'Посмотреть ',
'search_items' => 'Найти ',
'not_found' => 'не найдено',
'not_found_in_trash' => 'В корзине не найдено',
'parent_item_colon' => '',
'menu_name' => ''
),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => false,
'hierarchical' => true,
'menu_position' => null,
'supports' => array('title','editor','author','thumbnail', 'page-attributes')
) );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question