faq
// Register Custom Post Type
function faq() {
$labels = array(
'name' => 'FAQ',
'singular_name' => 'FAQ',
'menu_name' => 'FAQ',
'name_admin_bar' => 'FAQ',
'archives' => 'FAQ',
'attributes' => 'FAQ',
'parent_item_colon' => 'FAQ',
'all_items' => 'FAQ',
'add_new_item' => 'Dodaj FAQ',
'add_new' => 'Dodaj FAQ',
'new_item' => 'Nowy FAQ',
'edit_item' => 'Edytuj FAQ',
'update_item' => 'Aktualizuj FAQ',
'view_item' => 'Zobacz FAQ',
'view_items' => 'Zobacz FAQ',
'search_items' => 'Szukaj',
'not_found' => 'Brak',
'not_found_in_trash' => 'Brak',
'featured_image' => 'Obrazek wyróżniający',
'set_featured_image' => 'Ustaw obrazek wyróżniający',
'remove_featured_image' => 'Usuń obrazek wyróżniający',
'use_featured_image' => 'Użyj jako obrazek wyróżniający',
'insert_into_item' => 'Wstaw',
'uploaded_to_this_item' => 'Wgraj',
'items_list' => 'Lista',
'items_list_navigation' => 'Lista',
'filter_items_list' => 'Lista',
);
$rewrite = array(
'slug' => 'faq',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => 'FAQ',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes' ),
'taxonomies' => array( 'faq-category' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-editor-help',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'faq',
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'faq', $args );
}
add_action( 'init', 'faq', 0 );