WP Manifestindependent plugin directory
manifest / content / wpuposttypestaxos

WPU Post types & taxonomies

★ 2stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/wordpressutilities/wpuposttypestaxos/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Add a post type

add_filter('wputh_get_posttypes', 'wputh_set_theme_posttypes');
function wputh_set_theme_posttypes($post_types) {
    $post_types['work'] = array(
        'wpu_disable_feed' => true,
        'menu_icon' => 'dashicons-portfolio',
        'name' => __('Work', 'wputh') ,
        'plural' => __('Works', 'wputh') ,
        'female' => 0
    );
    return $post_types;
}

Add a taxonomy

add_filter('wputh_get_taxonomies', 'wputh_set_theme_taxonomies');
function wputh_set_theme_taxonomies($taxonomies) {
    $taxonomies['work-type'] = array(
        'wpu_public_archive' => true,
        'name' => __( 'Work type', 'wputh' ),
        'post_type' => 'work'
    );
    return $taxonomies;
}