Questions tagged [taxonomy]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
11 views

Automatically check parents (in a taxonomy) when child is selected

On my website I have a custom taxonomy which contains a lot of parents, children, subchildren etc. Because of this, it is really long to manually find what I want, so do you know if there is a way to ...
0
votes
0answers
17 views

Moving a meta field value in a taxonomy

A meta field was created, but it is not so convenient to use it, so a taxonomy was created, now for each entry need to transfer the values from the meta field to the taxonomy field, did this function ...
0
votes
0answers
18 views

Restaurant Menu Structuring

I have built a multi-restaurant ordering system using Woocommerce. In which I have categorized the food, with the food category name and the restaurant name. for instance If I have chicken shawarma on ...
1
vote
1answer
18 views

How can I increase the length for the taxonomy term slug?

I am trying to create a new term in topic taxonomy. Since I am writing in Bangla Unicode instead of English, the slug is created with lesser/broken text. Is there any hook to update the length for the ...
2
votes
1answer
58 views

Paginate_links won't create the right links on a taxonomy filtered custom post type archive

after hours and dozen of tests and messes... i'm face to the wall and fed up searching (mainly cuz my google's answers are already all clicked !) I'm trying to display paginate_link with a filters ...
1
vote
0answers
48 views

What is faster: custom taxonomy or serialized post-meta for db retrieval? (over 60,000 posts)

I have a search plugin that can search serialized metadata as well as categories (for multi-checkbox). Is there any advantage to using serialized post metadata instead of creating a custom taxonomy ...
0
votes
0answers
16 views

How to set the same base url for two different taxonomies?

I have created two custom taxonomies. function themename_custom_taxonomies() { // Coaching Method $nieruchomosc = array( 'name' => _x( 'Nieruchomość', 'taxonomy general name' ), ...
1
vote
1answer
25 views

Redirect all child taxonomy to its parent

Is it possible to automatically redirect a child taxonomy to its parent, therefore not having a public page at all for the child taxonomy? Example: I have a taxonomy called venue, this is set up with '...
0
votes
0answers
12 views

How to use the Term Object from a custom select field in a query

I have a WordPress site in which I want to show 2 recent posts from a specific category. I want to use custom fields (via ACF in this case) to allow the site admin to choose/change the category ...
0
votes
0answers
19 views

ACF Taxonomy field values not select in backend

I created delivery type field using ACF taxonomy. And its working finecheck but I need to add this field in my website product add page. I used some hardcode in my theme funtion.php to show the ...
1
vote
0answers
10 views

Loop through categories and display posts title under each dropdown

I want to loop through categories and display the post's title under each category dropdown. Clicking the post name from the dropdown will display the post content in a tab pane in WordPress. Can ...
1
vote
0answers
8 views

Display tag image in post using Taxonomy Images plugin index.php

I'm a beginner programmer, and I need to display its image along with the tag, how can I do this? Here is the code: <div class="blog-list row"> <?php ...
0
votes
0answers
7 views

Need to print category and subcategory of current post item (Custom post type)

I have a custom post type called products and that have category and subcategory (locations) like Delhi, India Karnataka, India Sharjah, UAE Above are the categories and subcategories(child). Here ...
0
votes
2answers
14 views

display taxonomy terms with link

How can I print the taxonomy terms with links?? This code work but print the terms without link.. some advice?? function show_all_terms($taxonomy){ $taxonomy_terms = get_terms($taxonomy); ...
0
votes
0answers
9 views

Automatically assign taxonomy to all my subcategories

Right now I have this Category 1 > Category 2 I have a list of 300 subcategories that I need to assign to all my Category 2. Is there a way to do that?
0
votes
0answers
18 views

Show taxonomy terms according to post type

I have a global taxonomy called "test taxonomy" and that is used by 3-4 post types (Post Type1, Post Type2, Post Type3, Post Type4...). Some taxonomy (test taxonomy) terms are not used in ...
1
vote
0answers
22 views

New Categories Not Shown In the Post Edit Page

I have a problem with setting up new categories for my new posts. When I publish my second article on the blog, I have created e new category. But when I posted it, the actual category is not showing ...
0
votes
1answer
46 views

Wordpress Shorcode Display hierarchical taxonomy [child, parent]

I have a slight problem to display the parents of taxonomy in wordpress. (CPT=property and tax = property_city) I did a little research to figure out what to do. but I can't quite figure out how to ...
0
votes
0answers
14 views

wp_get_object_terms returns only Uncategorized on first publish

I would like to get all assigned categories of a post once it's published with the save_post hook: add_action( 'save_post', function( $post_id, $post, $update = null ) { if ( 'publish' == $post-&...
0
votes
0answers
15 views

How to import Countries->States/provinces->Cities as a custom hierarchal taxonomy

I'm building a website where people can upload custom posts on the front end and add countries/cities as a custom taxonomy (location categories) that are easily searchable. I've been able to add all ...
0
votes
0answers
19 views

new custom filed not showing in taxonomy

I want to add a new ACF filed to my taxonomy page, but the text isnt appearing. I have tried <?php the_field('extra_text');?> <?php the_sub_field( 'extra_text' ); ?> but neither one work. ...
0
votes
0answers
29 views

How to display acf repeater in tag archive page?

I want to show some repeater fields on tag archive page. with this code I can display the simple text fields of acf: $term = get_queried_object(); $meta = get_field('test', $term); but when want to ...
0
votes
0answers
15 views

wp_remove_object_terms correct way to call child of parent taxonomy in woocommerce

In Woocommerce I am currently able to assigned and unassign a product category from a product by calling the following. // to assign wp_add_object_terms ( $product_id,'in-stock', 'product_cat' ); //...
1
vote
0answers
19 views

How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/

I am trying to achieve this in WordPress, but no luck Here '/communities' is custom Taxonomy of post type 'PAGE', '/Palo-alto' is term from communities taxonomy . I want user first to click on ...
1
vote
0answers
59 views

Advanced Custom Fields displaying on tag pages

I have edited Advanced Custom Fields before but never set anything up from scratch, always relied on developers. But I'm wanting to do a very specific thing and I was hoping I could do it by myself. I ...
0
votes
0answers
18 views

How do I filter get_terms() by terms in another taxonomy?

I have a custom post type 'resources' that has two taxonomies 'topic' and 'type'. I want to get the number of each 'topic' with the 'type' of either 'ebook' or 'blog'. This pseudo code is a reflection ...
0
votes
1answer
20 views

Get Child Category only

I am using this code to retrieve category: $post_id = get_the_ID(); $countries = get_the_terms( $post_id, 'country' ); $fcountry = $countries[0]->slug; However this sometimes retrieves the ...
1
vote
1answer
30 views

How to add a dynamic dropdown derived from custom taxonomy

I have created a custom taxonomy state and city. I want to fetch all the city for a given state using a drop down list. suppose first i need to select a state and then drop down automatically ...
0
votes
0answers
10 views

Display all subterms of a custom taxonomy filtered by parent terms

I have a custom taxonomy which i called 'fonte' that should display a list of books. These are divided in two parent terms, 'mixed' or 'single'. So the hierarchy is something like that: Mixed book1 ...
0
votes
0answers
15 views

One Taxonomy Shared with Multiple Custom Post Type

My code below is for Wordpress registering multiple custom post type sharing the same one taxonomy. The taxonomy and CPT are registered successfully, however it shows the tax at the second CPT only ...
0
votes
0answers
15 views

My list of terms of custom taxonomy displays 7 times

I'm building a custom page template to show a list of terms from a custom taxonomy named "autore", and I don't know why it displays the full list more than one time (seven times, to be ...
0
votes
1answer
28 views

Get taxonomy name for the current post

I am trying to get the name for a custom taxonomy assigned to the current post and in my template I have: $countries = get_terms( 'country', array('hide_empty' => false,)); $fcountry = $...
0
votes
2answers
27 views

Custom field with terms from another taxonomy programmatically

I have a custom taxonomy A with some terms (A1, A2,A3, etc) and a second custom taxonomy B. I want to create a custom field in taxnomony B which will be a dropdown menu with the terms from taxonomy A. ...
0
votes
0answers
23 views

Taxonomies and subtaxonomies relations

I am struggling with how to relate taxonomies and subtaxonomies in wordpress. I have one custom taxonomy (Courses) and a subtaxonomy (Recipes) from Courses. I also have another taxonomy (Country) and ...
0
votes
0answers
11 views

List All Terms With Posts in A Specific Category

The following code lists all terms in a taxonomy, specifically all possible values of an attribute in my WooCommerce store: <ul> <?php $taxonomies = array( 'pa_diameter' ); $args =...
0
votes
1answer
12 views

How to assign tag to custom post type in wordpress?

I’m pretty stuck on this wordpress challenge where I need to programmatically assign a taxonomy to a custom post type. How can I successfully assigned programmatically a tag to a custom post type? Im ...
0
votes
1answer
18 views

Limit categories to hierarchal depth of 2

Is there a way to limit the standard post categories to only allow one level of subcategories? For example, allow the following: Fruit > Apple Veg > Lettuce But from here, do not allow &...
0
votes
0answers
10 views

Custom Taxonomy Pagination Not Working

I have a custom taxonomy called by "Singers" related to the posts and Created custom page with the same name (singers.php) as archive to showing taxonomies in there. Now pagination in this ...
0
votes
0answers
14 views

Filtering posts based on three taxonomies

I've built a filterable post listing where the user can filter based on two taxonomies, this is working but I now want to add a third taxonomy to the filter, but I think the logic I'm using isn't very ...
0
votes
0answers
8 views

Modify slider plugin's get taxonomy to include custom taxonomy (years)

The below code allows me to customize my sliders by category. I have a custom taxonomy called "years" that I would like to include. Ultimately, I want to be able to make sliders by category ...
0
votes
0answers
15 views

Retrieve the child terms by having the parent's information

I have access through a series of joins to the terms table, in order to bring out all the taxonomies that are associated with the post if I wanted to. with this code: <?php echo "{$r->...
1
vote
0answers
22 views

Show Post Count of a Category

I've been stuck on this for a little while now, and have tried multiple ways to achieve this with no luck. I've been looking for two ways to display the total posts found on a specific, and non-...
1
vote
1answer
23 views

Taxonomy archive showing no results

I have the file taxonomy-project.php and am trying to view results for some of my terms. I keep getting a result of NO even though I have a post applied to that particular term. taxonomy-project.php &...
1
vote
1answer
59 views

how to show only last child terms of a taxonomy

I'm trying to show the only the last child terms of a taxonomy in a post. For example, the post "Johnny Pastafrolla" has the following terms of the taxonomy "camp" selected: ...
0
votes
0answers
35 views

Define multiple prefixes for custom post type

I have created CPT called "Pharmacy" which have a lot of pharmacies inside (approx 10.000) Pharmacies offer 2 different services (skin & scalp) and some provide both services but some ...
0
votes
1answer
12 views

How can i conditionally load taxonomy-{taxonomy}.php template php files through functions.php

I have a movie review site, i would like to conditionally load the taxonomies of actors and directors only if a option of my theme is active. At the moment in the root theme folder I have these 2 ...
0
votes
0answers
35 views

Display category filters for custom post type when category is shared by multiple post types

I already have a solution to this problem but I'm wondering if there's a more efficient way to do it. I have a custom post type called "galleries" that uses the same taxonomy as blog posts. ...
0
votes
1answer
16 views

Fill New Taxonomies

I will explain my scenary and then my problema.. I have more than 10.000 products on my woocommerce categorized by differents name. IE car parts. I need yo create a new type of taxonomy that I will ...
0
votes
0answers
12 views

Order category in shop page

i have this function to order for category the shop page in woocomerce function so_27975262_product_query( $q ){ //$q->set( 'category__in', array(96,105,97) ); if( !is_product_category() ) { ...
0
votes
0answers
16 views

get_categories() retrive post_tag instead category

I want to rewrite my category to a specific URL. but I get post_tag instead of category when I use get_categories(). Here my code add_filter( 'category_rewrite_rules', '...

1
2 3 4 5
37