A taxonomy is a generic "category" used to organize posts and custom post types

learn more… | top users | synonyms

0
votes
1answer
938 views

Displaying the category name of a custom post type

So I have a custom query, in which I'm displaying some results posts of a custom post type called "staff". This custom post type is linked to a custom taxonomy called "department". I am able to ...
-3
votes
1answer
15 views

How to create a custom widget in dashboard that shows stats for custom post type

I have a custom post type called Locations. I want to create a widget in the dashboard that shows number of posts in that post type, post taxonomy and number of item in each taxonomy. Any ideas?
0
votes
1answer
556 views

Taxonomy Category category.php not working

I have created custom post type, taxonomy and categorys. When viewing the category it seems to be using index.php and ignoring the WordPress template hierarchy. Any ideas why category.php, category-{...
0
votes
1answer
35 views

How to Manage and link certain custom taxonomy?

I'm creating some kind of soccer dedicated website.Assuming we created 4 different taxonomies: Teams, Players, Tournaments, Managers. Team includes two different types: National Team Club ...
0
votes
1answer
495 views

List post from current taxonomy children

I have a custom post type and a taxonomy with children, with a template file named taxonomy-productcategories.php. On this i want to list all children with their posts. Child taxonomy 1 Child ...
0
votes
0answers
8 views

Create a post on registration with title include user first name

I use this code for create a post (-type) on user registeration: function create_new_user_posts($user_id){ $userinfo = get_userdata($user_id); if (!$user_id>0) return; $my_bio_post = ...
0
votes
1answer
419 views

Don't display taxonomy if empty

I'm using the following code to display my custom post taxonomies: function display_post_taxonomies( $content ) { if( is_single() ) { $args = array( 'public' => true, '_builtin' => false ...
1
vote
1answer
61 views

Custom taxonomy on users with UI

WP lets us register_taxonomy() with users as the object type, thus creating taxonomies mapped to user IDs rather than post IDs. Unfortunately this method is poorly documented and many features don't ...
0
votes
1answer
505 views

Custom Roll/Custom Post Type - Can't Select Categories

I am using Justin Tadlock's Members plugin 0.2.4. I have a custom user role "Author" that I am granting permission to post a Custom Post Type "blogpost". The Author can post and edit the CPT blogpost ...
3
votes
1answer
44 views

Save Filter for Taxonomies

I want to get rid of undesired HTML, mostly being published by my editors when copying text from other sources, like other pages or from Word Therefore I use add_filter( 'content_save_pre' , '...
0
votes
2answers
549 views

Possible to register multiple custom taxonomies in one function?

I'm registering 7 custom taxonomies in my functions.php. Since each function uses the same labels and arguments and is attached to the same Custom Post Type, I'm wondering if it's possible to register ...
0
votes
1answer
929 views

Getting the parent from the wp_term_taxonomy

Is there a built in wordpress function that let's me look up the "parent" field of the wp_term_taxonomy table if I pass the TT_ID to it? Something like get_value ( $wp_table_name, $id_fieldname, $...
2
votes
2answers
5k views

Custom Taxonomy as checkbox or dropdown

I have registered a custom tax to my CPT. On the edit screen the tax meta box appears with an autocomplete field. Is it possible to display it as checkboxes or dropdown instead?
2
votes
1answer
941 views

How to get the depth of a category's subcategories

I'm looking to get the depth a category's subcategories. Suppose I have a category 'grandparent' which has a subcategory 'parent' which in turn has a subcategory 'child'. How do I get to integer 2? ...
0
votes
1answer
20 views

Get pages only with a specific taxonomy

I added a custom taxonomy called 'post_tag' to the pages, and I am trying to make a query that gets only the pages that have a specific tag set. I already tried in several different ways, even using ...
1
vote
8answers
5k views

How do I list custom taxonomy terms without the links?

I've searched far and wide to try and find an answer to my question. I'm hoping I can get help here. Here goes... I'm currently retrieving the terms of my custom taxonomy using: <?php echo ...
2
votes
4answers
1k views

How to sort list of custom posts to get view like a tree of posts under categories and their children's categories?

I'm new here and my english isn't perfect so I'm sorry for this :) I'm here because I'm workin on site with post list sorted by category and I have problem with sort out my posts in categories and ...
0
votes
1answer
472 views

Display 1 Post per taxonomy with polylang

I am trying to make a loop where I display all my taxonomies with the first post of every taxonomy. It's the taxonomy "customers" and I want to display every first portfolio-CPT of the customer. I ...
0
votes
0answers
19 views

Order posts by term in alphabetical order

I know it's possible to order by terms, but having migrated a huge amount of data from a different CMS, I'm left with a list of brands that are taxonomy terms. I'm using ACF to present the terms as a ...
2
votes
1answer
24 views

Is there a filter hook that I can use to change how taxonomy term names are displayed?

I need to hide a custom taxonomy's terms' names on the frontend while preserving them on the backend. Instead of the terms' names I need to display pseudonyms. I can't find a single filter hook to do ...
0
votes
0answers
23 views

Help to fix custom post rewrite + taxonomy. Simple pages show 404

I'm getting 404 for each page. I want to have structure and pages like: url/page-sample url/taxonomy url/taxonomy/custom-post Example of structure (just trying to explain): url/about-us-page url/...
0
votes
0answers
14 views

Taxonomy archive: Query all posts first, and then group by taxonomy term?

I have two taxonomies: 'season' and 'style'. On my 'season' archive template, the following query groups all the 'season' posts by their 'style' term. This works great. But the problem is that I ...
0
votes
1answer
25 views

Permalinks for a custom post type - with a page template (custom query) and taxonomy archive

I'm having trouble getting my permalinks working with a specific custom post type setup. Here's the code for the custom post type: function jc_attactions() { $labels = array( 'name' => '...
0
votes
1answer
2k views

How to add upload field in a custom taxonomy?

I have a custom taxonomy and I want to add a custom field inside , OK that's seems to be easy but the hardest part is when I want to add a file input type the enctype="multipart/form-data" I ...
-2
votes
1answer
57 views

Get posts that matches specific terms of multiple custom taxonomies

I'm working on a page that show a lot of products. My structure is Product (custom post type) -->Brand (custom taxonomy) ------>Brand A (custom term) ------>Brand B (custom term) -->Department (...
0
votes
0answers
35 views

WP Job Manager - display search results from custom search form in taxonomy-job_listing_category page

i want to ask something about wp-job-manager plugin. i have been already created a taxonomy_job_listing_categoy template to list all jobs from a certain job category. You can see an example here: http:...
0
votes
0answers
33 views

WP Query with sticky posts and tax_query

I have this query; $posts = new WP_Query(array( 'post_type' => 'post', 'posts_per_page' => 5, )); Which correctly places sticky posts at the beginning. However,...
0
votes
2answers
4k views

Custom Taxonomy with tax_query

So I've created a custom taxonomy type with a plugin (CMS Press) and now I'm trying to get all of the posts with the taxonomy terms in that taxonomy. My get_posts looks like this: $args = Array( ...
0
votes
1answer
913 views

Multiple tag cloud filtering

I am writing a plugin which creates a custom post type and two associated custom taxonomies. The custom post type list/archive page should be filterable by terms in one or both taxonomies i.e not just ...
0
votes
3answers
565 views

Remove category from query (show all posts in archive.php) pre_get_posts()

I am using pre_get_posts() to allow all posts to be displayed on any category archive. This is because I will provide a javascript sorting and filtering method using isotope.js. Any category page will ...
1
vote
2answers
1k views

Custom Post Type Taxonomy Filters

Im really struggling to piece this functionality together, and hope someone can help or provide snippets to get me there. So I'm creating a section on a website where stories are published, I have ...
0
votes
0answers
14 views

Display posts in a custom taxonomy, grouped by a different taxonomy

The setup: I have a custom post type called products. I have a custom taxonomy called styles with terms modern, classic, rustic. I have another taxonomy called seasons with terms fall, winter, ...
0
votes
1answer
146 views

Copy/Move selected taxonomy terms to another taxonomy for posts

I've been searching for about 2 hours now on a solution of copying/moving selected taxonomy values for each posts to another. Here's the situation. I'm working on a site that has a post type of ...
1
vote
0answers
70 views

Sorting a specific taxonomy by archive date using URL

OK, so I'm looking for a way to sort a specific taxonomy by archive date using the site URL. Say the custom taxonomy ("sort") value is "fruit" then then you would currently get all the posts marked ...
1
vote
1answer
49 views

Filter blog archive by category in URL

I've created a fairly basic form that allows users to filter post type archives by their taxonomies. On custom post types this is super simple to do by simply setting ?taxonomy_name=term_slug in the ...
0
votes
1answer
429 views

How to get selected taxonomy or category ID if using custom walker?

I'm building a taxonomy->child taxonomy dropdowns where the child will only be active if the parent is selected. Everything works great, except that I'm using wp_dropdown_categories for the parent ...
-2
votes
0answers
29 views

Custom post type use defaut toxonomy blog category and post_tag

I register a new custom post type. I decided to use default category and post_tag of blog for it. 'taxonomies' => array( 'category', 'post_tag' ), However, I don't know how to get ...
1
vote
1answer
29 views

Attaching taxonomy data to taxonomy with wp_insert_post

By WP User Frontend I create a registeration form with some checkboxes, and use wp_insert_post and update_user_meta for create a new post (post type pavilion) on user registration.I want when checked ...
1
vote
1answer
724 views

Duplicate Custom Post Type and Taxonomy Slug

I've seen a few questions that are very similar, but I haven't been able to get an exact answer, so I'm going to explain my situation here. Quite simply, I need the following url structure: site.com/...
0
votes
1answer
518 views

Query Custom post type with Taxonomy Custom Field

I have a Taxonomy called Cities. I have created a custom field for this taxonomy, using ACF, called Country So I can create a City and select the Country (select list with predefined options) it ...
0
votes
1answer
993 views

get_term and get_term_by return null or false, even though term exists

I am trying to use the action hooks delete_term and delete_$taxonomy, among other hooks that delete a term, but they are presenting the same issue. For example, 1234 is an existing term in the ...
0
votes
2answers
661 views

child_of not working in wp_dropdown_categories

I have wp_dropdown_categories working without setting child_of. Once I set child_of, all categories disappear. Here's my code, what should I do to enable child_of? function dropdown(){ $book_term=...
26
votes
3answers
26k views

How to get all taxonomies of a post type?

How can i get taxonomies of a post type? If I have a post type event and i need to find out the list of taxonomies that are attached to that post type. How do I find them?
1
vote
2answers
664 views

How to limit the number of terms (terms acts like categories)

Hello i have created taxonomy in custom post type that act like category. then i have created terms that acts like categories. i have create widget that show all terms from taxonomy. all works great....
1
vote
1answer
35 views

Return Taxonomy/Term Information with Posts (WP_Query/get_posts)

Is it possible to return taxonomy/term information for posts along with the posts themselves when querying with get_posts? I have around 150 items I am querying so I don't want to loop and pull each ...
0
votes
1answer
26 views

wp_get_post_terms on custom post type with custom taxonomies returning an empty array

I am trying to get the taxonomy values associated with my custom post types. I have a function which fetches a post ($object)'s taxonomies, then cycles through the taxonomies and gets the values for ...
1
vote
1answer
32 views

How to get post's current parent term ID?

How do you get the ID of the parent term of the current child term assigned to a post. For a custom taxonomy? Custom taxonomy: "location" Countries Japan USA Mexico Cities New York Austin ...
0
votes
0answers
7 views

Same Permalinks for Custom Post Types and Category Taxonomy

I am trying to figure out how it is possible to use the default WordPress Category taxonomy across my entire WordPress site, including three custom post types that I have defined. I would like to ...
0
votes
0answers
9 views

Display nested taxonomies with current class

I have a Wordpress site with a Products custom post type (I'm not using Woocommerce as it is not an ecommerce site). The custom post type has taxonomies with 2 levels (top-level categories and sub-...
0
votes
0answers
17 views

sub categories and products that are directly assigned to main category not displaying

I have a scenario in which i have a side bar. In side bar all the main categories are displayed. There are also some sub categories that are assigned to main categories. Now i want to display both sub ...