How to Change Portfolio Post Type Labels

To customize the Portfolio post type labels you should install the child theme then add this code the the file functions.php inside the child theme then apply the desired modifications:

function update_theme_slug( $args, $post_type ) {
    if ( 'portfolio' === $post_type ) {
        $my_args = array(
            'labels'                => array(
                'name'                  => __('Portfolio','pixfort-core'),
                'singular_name'         => __('Portfolio item','pixfort-core'),
                'add_new'               => __('Add New','pixfort-core'),
                'add_new_item'          => __('Add New Portfolio item','pixfort-core'),
                'edit_item'             => __('Edit Portfolio item','pixfort-core'),
                'new_item'              => __('New Portfolio item','pixfort-core'),
                'view_item'             => __('View Portfolio item','pixfort-core'),
                'search_items'          => __('Search Portfolio items','pixfort-core'),
                'not_found'             => __('No portfolio items found','pixfort-core'),
                'not_found_in_trash'    => __('No portfolio items found in Trash','pixfort-core'),
                'parent_item_colon'     => ''
              ),
            'rewrite' => array( 'slug' => 'portfolio-item', 'with_front' => true )
        );
        return array_merge( $args, $my_args );
    }
    return $args;
}
add_filter( 'register_post_type_args', 'update_theme_slug', 10, 2 );
pixfort
pixfort
Support Team

Hey, this is pixfort support team, if you still need help you can always reach us via your pixfort account

Related Posts

Search

Start typing to search for a specific article on our website

Made with Popup Builder
Image link
Hey there

Search for a specific article

Get started

Check useful guides to get started

Still need Help?

Send us a support message

Our usual reply time: 1 Business day