You can use the rewrite
parameter to disable the front portion of the URLs (/academy/
in your case) for custom post types.
function create_posttypes() {
$labels1 = array(
'name' => __( 'Definitions' ),
'singular_name' => __( 'Definition' ),
'all_items' => __( 'All Definitions' ),
'view_item' => __( 'View Definition' ),
'add_new_item' => __( 'Add New Definition' ),
'edit_item' => __( 'Edit Definition' ),
'update_item' => __( 'Update Definition' ),
'search_items' => __( 'Search Definitions' ),
'not_found' => __( 'Not Found' ),
'not_found_in_trash' => __( 'Not Found in Trash' ),
);
$args1 = array(
'label' => 'Definitions',
'description' => 'Definitions received',
'labels' => $labels1,
'public' => true,
'has_archive' => true,
'rewrite' => array(
'slug' => 'glossary',
'with_front' => false,
),
'hierarchical' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'supports' => array('title','thumbnail', 'revisions', 'page-attributes')
);
register_post_type( 'definitions', $args1 );
}