Questions tagged [taxonomy]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
22 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
0answers
9 views

How can I make a similar Wordpress Website [closed]

I have installed a wordpress and I want to make it similar to the one on the domain http://electronics-tutorials.ws . I have tried many plugins and themes but I can't get it to be arranged similar to ...
0
votes
2answers
23 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
22 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
11 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
11 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
6 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
13 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
7 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
12 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
21 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
51 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
11 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
32 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
14 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', '...
0
votes
1answer
24 views

Is there is a way to group a large number of WordPress Multisites For Easier Organisation?

I did some extensive Google searching before this and I have come up empty-handed, so I am hoping someone has a better idea of what my options are here. I am planning on using WordPress for an ...
0
votes
0answers
18 views

Display child term of current parent taxonomy term

I would like to display child terms according to my current taxonomy parent term. So we have tree like this: Term 1 Sub term post post Sub term post Term 2 Sub term post post In taxonomy.php ...
0
votes
1answer
65 views

JS POST update data taxonomies

How can I call the value of each term with my js function? I need use a Array not just ` useractivities=[]; $('.user_activities').each(function(){ useractivities.push( $(this)....
0
votes
0answers
45 views

Checking if a product ID has taxonomy term attached not working with has_term

I am trying to figure out if a woocommerce product ID has an associated taxonomy term attached to it. The below id 434 does indeed have an attached rimless term in the material taxonomy but the below ...
0
votes
0answers
8 views

Product categories in url

I have following product categories in my app. Women -> Outerwear When I go to outwear category. Current URL is following foo.com/outerwear But I want to: foo.com/women/outwear how can I do it? ...
1
vote
2answers
56 views

Retrieve taxonomies from arbitrary site

Background I need to retrieve terms for a post in an arbitrary site on a multisite network. This is not necessarily the site that the WP instance is running in at that moment. wp_get_object_terms() ...
0
votes
1answer
33 views

How to set acf color field as background color to product category

I have set an acf color picker field for woocommerce product category. I would like to set this color as a background to the category name that I've printed on the product page. I've tried to set the ...
0
votes
0answers
10 views

How to set Load more button for custom taxonomy products using Ajax

I want to show more products for Load more button but my tax_query is not working for that particular taxonomy category. So how can I get the current taxonomy name to find the products? My Taxonomy ...
0
votes
0answers
15 views

Taxonomy term page not listing linked products

I have created a custom taxonomy named "Contributor" with the following code: if ( ! function_exists( 'contributor_custom_taxonomy' ) ) { // Register Custom Taxonomy function ...
0
votes
0answers
29 views

Get authors by term id or slug

This question sounds wired but I am in a situation where I need to list all author who posted in a particular term. What I did so far, I am able to get all posts under a particular term and stored the ...
0
votes
0answers
10 views

How to set custom slug for core post type “post” and core taxonomy “category”?

I am looking for solution to set specific slug for posts and categories. I have default post type and taxonomies (category, tags). Permalink settings - "/%category%/%postname%/" I need ...
0
votes
0answers
16 views

Permalinks Help?

Just wondering if anyone can help, please. Basically I have a Custom Post Type 'Courses', with a taxonomy of 'Subjects'. When I create a Course Custom Post Type I name it something like Oxford English ...
0
votes
0answers
58 views

add pagination in wordpress page template

I am using custom page to display my taxonomy terms the terms are displaying fine but i dont want the terms to all show in one page i want 2 terms per page but the pagination is not working and its ...
0
votes
1answer
39 views

Show Taxonomies with admin area for custom post type?

I'm not sure if this possible, but I'd like to be able to show my taxonomies within the admin area of my custom post type so that WordPress users can sort the posts my e.g. subject. Here's my code ...
1
vote
2answers
128 views

WordPress Customizer - pass setting value into another control to live update drop-down choices

In the WordPress customizer script, I am trying to pass the value from a select control into a custom control that displays taxonomies associated with the selected value (1st control). $wp_customize-&...
0
votes
1answer
11 views

Showing related post for custom taxonomy

I need to edit single.php file in order to show related post for a custom taxonomy I've already created (named 'tag-italia). Can anyone help me to achieve that? For the "general" related ...
0
votes
0answers
83 views

How do I get the correct URL?

Helo, WordPress Community! Help me, please. Created a custom post type with one taxonomy added as a category. Overwrite rules have also been created to display the complete structure of the CNC, for ...
1
vote
1answer
34 views

How to Filter custom post type by taxonomy?

here is my code trying to make it <div class="row"> <div class="col-lg-3 col-md-12"> <div class="card"> <div class="card-body&...
0
votes
3answers
150 views

How to give each category name its own ACF background color?

I'm building a webshop, and started to configure the product loop on the shop archive page. I display the product category related to every product, and I would like to set to the categories to have a ...
0
votes
0answers
16 views

Noticed updating taxonomy terms take a long time and run out of memory

Not sure if it's related to 5.5, that is what we're running. But if we go to edit a taxonomy term (say... update the description). It's been taking a long time. Some investigation reveals that it's ...
0
votes
0answers
22 views

Can I create a tax query to return posts that match two slugs from same taxonomy

What I'm trying to achieve: I have a taxonomy 'module_data' which is hierarchical. What I want is to use a tax query to get all posts that match a slug in an array of slugs for terms AND also match a ...
0
votes
1answer
32 views

Can't display multiple terms with get_the_terms

I am trying to display the terms (from a custom taxonomy) of a single post, but I can't display more than one term. When I try to display all the terms using a foreach loop, it doesn't display ...
0
votes
0answers
7 views

create filter on taxonomy admin page

Hello im trying to filter terms on the custom taxonomy page. But without luck. Any way to add filtes on the taxonomoy page?
0
votes
1answer
25 views

How to target all woocommerce categories that don't have any subcategories in them?

I want to target all pages (product categories) that are displaying the products themselves. My woocommerce settings set to show only categories/subcategories (unless there are none) and then by ...
1
vote
1answer
40 views

$_FILES empty on created_{taxonomy} and create_{taxonomy} yet is is not on edit_{taxonomy}

been struggling with a bug. On created_{taxonomy} hook yet in edited_{taxonomy} hook works and upload the expected file with no issues. As per the following code I added custom field type along with ...
0
votes
1answer
69 views

WooCommerce WP_Query using tax_query returns no results (0 = 1)

I am trying to get specific Products from WooCommerce baseed on a Product Attribute (taxonomy). $args = array( 'post_type' => array('product', 'product_variation'), '...
0
votes
0answers
9 views

Get The Most Recent Post of a Specific Term From Current Post

I'm developing a website for a webcomic and I'm having problems getting the page system to work. I have a custom post type set up for comic pages, and the pages are organized into volumes (with ...
0
votes
1answer
28 views

Setting posts_per_page for taxonomy term template

I have a custom taxonomy term page set up to display posts associated with that term (taxonomy-insight_type-academia.php). I figured I could use the following to limit the posts on that page based on ...
2
votes
0answers
23 views

Mixed unrelated taxonomy in permalink

we have a situation where we want to build permalinks using mixed (unrelated, ie not hierarchical) taxonomies in permalinks on a wordpress site. and we dont want the taxonomy name in the actual link. ...
0
votes
1answer
19 views

WP REST API not retrieving all categories

I am developing a project that is using the WP REST API. After some tests, I realized that it's not retrieving all the categories based on what I am trying to GET. In precise, there are supposed to be ...

1
2 3 4 5
37