How can I auto-assign a CPT post to category in a custom taxonomy when published?

As Documentation says, wp_set_object_terms accepts 4 arguments: $object_id, $terms, $taxonomy, $append object_id – ID of post, page, attachment or anything which is in post table terms – slug(s) or id(s) or term(s) taxonomy – slug of taxonomy – in your case it will be you custom taxonomy slug append – whether delete all existing terms … Read more

Custom Post type and permalink settings

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 … Read more

Add archive slug to default post post type

Using the permalink settings to configure your post permalinks, then modifying the author permalinks seems like the way to go. I set up the permalink rules like this: /post/%postname%/ Then used this code to modify the author permalinks (source): // change base of author pages- need to save permalinks to take effect function wpse82004_change_author_permalink(){ global … Read more