Articles of custom taxonomy

Issue with Custom Post Types and Single

I have a custom post type with custom taxonomies. I can get the list of posts to show from the main to the taxonomies (including the subs), but I can’t get the single post to show. I’ve tried to make single-news.php, which didn’t do anything. Still get the “Not found” message. function news_post_init() { $labels […]

Can I limit term selection to one plus parent?

So i have a custom post type (listings) and a custom taxonomy (listing_terms). The taxonomy has parent/child terms. Eg: Restaurant -> Cafe (where Cafe is the child of Restaurant). I want to only let my users to be able to select one child term and then have the parent term automatically selected when they’re creating […]

find posts that don't have a custom taxonomy

I am using a custom taxonomy series to keep track of posts that are in a series. I would like to find the posts that do not have a series. I have the following query: global $wpdb; $pr = $wpdb->prefix; $sql_no_series= “Select * from wp_term_taxonomy tt, wp_term_relationships tr, wp_posts p WHERE tt.term_taxonomy_id=tr.term_taxonomy_id AND tr.object_id=p.ID AND […]

WP REST API – get custom taxonomies based on terms & filter

I need to get the list of data’s with taxonomy term property_category,based on this property_category having data’s like apartment,house,office etc.For example localhost url given And also need to get the list of data’s with taxonomy term property_type_category,based on this property_type_category having data’s like rent,sale. And also one more question while filtering the data’s […]

How to query custom post type by two terms?

I am having issues when it comes to displaying a post based off two taxonomy selections. As of right now I am able to display my post based of one tax selection which is speakeryear. The problem is when I want to add my second tax which is placement_category and narrow it down based on […]

Get custom term meta problem on single post type

I’m trying to display a custom field value added to custom taxonomy on single custom post type. I have articles post type with custom taxonomy called issue. I used the code from Tax-Meta-Class to add custom field “publication date” to that taxonomy. For each issue I added a “publication date” value. To display the publication […]

How to count other posts not having specific taxonomy terms?

I have a custom post type “book”, and a taxonomy “language” with terms “php” , “java” ,”c”, “python”. I want to count “book” posts not having terms “java” & “c”.. such that posts with only “java” or “c” should be counted but posts with both “java” and “c” should not be counted. I tried tax_query […]

Identical custom taxonomy slugs for same hierarchical children

I have a custom taxonomy (editions) and would like to have a year / month hierarchy in the taxonomy reflected in the URL structure. /editions/2016/december /editions/2017/december /editions/2018/december WordPress doesn’t seem to allow me to create this on the admin side. Is this possible? For reference, here is my custom taxonomy setup inside of my functions.php: […]

Removing numerous Meta boxes from numerous CPTs

Hi I am building multiple sites for my work. All sites will take advantage of CPTs and Custom Taxonomies. Registered taxonomies will be handled using the Advanced Custom Fields plugin. Therefore, I would like to remove all taxonomy meta boxes from all potential sites. I know I can do this via the following: function my_remove_meta_boxes() […]

how to get title to custom tags page

how to get title to custom tags page ? & how to make if condition like to my taxonamy if ( is_page() ) { the_title(); } elseif ( is_tag() ) { single_tag_title(); } tax: add_action( ‘init’, ‘create_mtags_taxonomy’ ); function create_mtags_taxonomy() { $labels = array( ‘name’ => ‘More Tags’, ‘singular_name’ => ‘More Tags’, ‘menu_name’ => ‘More […]