Admin user get message higher level of permission to edit taxonomy
Admin user get message higher level of permission to edit taxonomy
Admin user get message higher level of permission to edit taxonomy
Modify permalink of CPT archive to support two taxonomies
An script/Plugin for automatic page creation per term
How to add categories to a custom post type using wp_insert_post($new_post);
You commented, “As far as I can see rewrite is only possible for one taxonomy?“. So no, that’s not true, it’s possible for every taxonomy. Just remember that each taxonomy should have a unique rewrite slug, so that it does not conflict with other permalinks (for other taxonomies and for post types like post, page, … Read more
With: wp_add_object_terms( $cpt_dates_post_ID, intval($manifestation_insert_id), ‘cpt_dates_postID’); You’re actually saying “Add a cpt_dates_postID term with ID intval($manifestation_insert_id) to the CPT with ID $cpt_dates_post_ID“. That won’t work, because intval($manifestation_insert_id) is the ID of: another post (from another CPT, freshly inserted with […] Not the ID of an existing $cpt_dates_post_ID term entry. The reason why these 2 work: wp_add_object_terms( … Read more
You’re correct that the issue is caused by the fact that the rewrite rule is set to include the %tax-name% placeholder even when a taxonomy is not set for the post. One way to dynamically set the rewrite rule based on whether a taxonomy is set or not is to use the post_type_link filter. This … Read more
Custom Taxonomy in custom REST API search
Query custom post type and group by taxonomy
Here are some optimization suggestions for the code: Refactor the code structure: Currently, the code is using multiple if statements to determine which template to display for each portfolio item. This can be refactored to use a single switch statement. This will make the code more readable and easier to maintain. Remove redundant code: The … Read more