/*
Theme Name:   Biscox Child
Theme URL:    https://wowtheme7.com/biscox-child/
Description:  Biscox Business Consulting WordPress Theme
Author:       wowtheme7
Author URL:   https://wowtheme7.com/
Template:     biscox
Version:      1.0.1
License:      GNU General Public License v2 or later
License URL:  http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain:  biscoxchildtheme
*/

/*
    Please Add your custom styles here
*/

/**
 * Change Service custom post type URL base from /all-service/ to /services/
 * CPT name: service
 */
function efs_change_service_permalink_base( $args, $post_type ) {
    if ( 'service' === $post_type ) {

        // Change single URL base
        $args['rewrite'] = array(
            'slug'       => 'services',
            'with_front' => false,
        );

        // Change archive URL (optional, but recommended)
        $args['has_archive'] = 'services';
    }

    return $args;
}
add_filter( 'register_post_type_args', 'efs_change_service_permalink_base', 20, 2 );
