Custom Taxonomy and Categories
Custom Taxonomy and Categories
Custom Taxonomy and Categories
Page that lists publications by classifying them by taxonomy
Don’t have any experience with JetEngine CPT, but you can try: add_filter(‘post_type_link’, ‘wpse404402_post_type_link’, 10, 2); function wpse404402_post_type_link( $link, $post = 0 ){ return home_url( ‘cpt-type/’ . $post->ID ); } Don’t forget to flush permalinks after that. Also – maybe JetEngine CPT also uses this filter, try to see maybe changing the priority on that add_filter … Read more
You should be able to check the conditions and add capabilities like this: if(wp_get_current_user(‘gallerist’) AND ‘cats’ == get_post_type() AND has_term( ‘status’, ‘age’ )) { $gallerist_role = get_role( ‘gallerist’ ); // Adding a new capability to role $gallerist_role->add_cap( ‘custom_capability’ ); } I am sorry I can not test it but I think it is a start
Orderby meta_key/meta_value not displaying anything, am I overlooking anything?
conditional filter
How to set a ‘page’ as parent of a custom post type?
Duplicate slug/permalink issue while adding same post name
I managed to solve my issue by looping through a get_the_terms() function. In my case, I’ve also created a shortcode. function display_taxonomy() { $prognoses = get_field(‘prognosis’); ob_start(); if( $prognoses ): foreach( $prognoses as $prognosis ): $terms = get_the_terms( $prognosis->ID , ‘my_custom_taxonomy’ ); foreach ( $terms as $term ): echo $term->name; endforeach; endforeach; endif; return ob_get_clean(); … Read more
Remove cpt slug from url and use custom taxonomy instead breaks all other cpt