Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [taxonomy]

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

1
vote
0answers
18 views

Make Categories a Dropdown Menu in Media Library

I would like the categories menu to appear as a drop-down in both the list mode and grid mode view of the Wordpress media library. As of now, it only appears as a drop-down in list mode. List Mode - ...
0
votes
0answers
26 views

Permalink issue with custom taxonomy/custom post

So I have a custom post type "newsroom" and a custom taxonomy "newsroomtopic" and I desire the following URL patterns: Taxonomy Archive: /about-us/newsroom/%newsroomtopic% Post: /about-us/newsroom/%...
0
votes
1answer
16 views

show recently added tags to tag cloud

Is there a way to show the most recently added tags to tag cloud? Do I have to use the https://developer.wordpress.org/reference/functions/wp_tag_cloud/ thank you
0
votes
0answers
12 views

how to get the custom taxonomy of a newly published post?

I need to get the custom taxonomy id and slug of a newly published custom post. I have tried wp_get_post_terms, wp_get_terms methods and all of them returns null. They returns the values if the post ...
0
votes
0answers
8 views

List attachments by taxonomy

Trying to list two columns of attachments (pdfs), each with taxonomies (tags) of either "sub" or "ins". I almost have it but no quite: <?php $terms_array = array( 'taxonomy' => '...
1
vote
1answer
14 views

Custom page archive query by url var calling page twice on one of my custom queries?

This is such an odd issue. I will try and break it down as simply as I can. I am creating my own custom page query which works like an archive using url variables to customise the query results. ...
1
vote
1answer
32 views

Why does a new taxonomy term get created when I assign an existing term to a post?

I've got a stumper... I've created a new taxonomy called Article Type. I created four values for it, as shown in this metabox: When I select the "Entertainment" term and update the post, something ...
0
votes
0answers
8 views

How to refresh Parent Term List after creating a new category

I want to repopulate parent terms drop down once a new category is created. At least refreshing the current page is enough. I tried to hook into "create_category" hook also. I'm using custom post ...
0
votes
0answers
28 views

Adding wordpress taxonomy name on a list table in the post with shortcode

Hi there I have constructed a function that return taxonomy post term array by using (wp_get_post_terms function) in wordpress. I added this function to the functions.php file of my custom theme ...
0
votes
0answers
11 views

meta filter and taxonomy filter on custom taxonomy template

http://192.168.178.17/property/city/mohali/ city is my taxanomy template i want to add filters in query string for taxonomy, category and meta data how to add filter
0
votes
0answers
25 views

I can not update fields with the tax_input tag using wp cli

i'm using this command for update in command line using wp-cli tool. wp post update 12349 --meta_input='{"opalestate_ppt_parking":"2"}' --tax_input='{array('opalestate_statuschecklist' => 'rent')}'...
2
votes
1answer
22 views

What's the difference between “parent” and “category_parent” in a WP_Term object?

What's the difference between "parent" and "category_parent" in a WP_Term object? For example: [1] => WP_Term Object ( [term_id] => 24 [name] => Essential Oils [...
0
votes
0answers
11 views

Wordpress Register Taxonomy - Can't untick all

I have a taxonomy on my website that I have registered in the code. I am unable to select none which I would like as an option. I can add and remove options as long as at least one is chosen but this ...
0
votes
1answer
8 views

Show the section only if custom taxonomy was chosen

So I have a code where all items of my custom taxonomy ('colour') are displayed. I broke my head trying to show the section ("colour__chart") only if one of taxonomy items was chosen. In simple words, ...
0
votes
0answers
24 views

Get Post Primary Category

I have troubles with getting the posts primary set category. How should I achieve this? My code: global $post; $terms = get_the_terms( $post->ID, 'event-categories'); if($terms) { foreach( $...
0
votes
0answers
8 views

How to add additional button on edit custom taxonomy screen?

How to add additional button on edit taxonomy screen and call a PHP function on clicking that button.
-1
votes
0answers
11 views

Orderby count and post_status any dosent work toghether

I have a field that shows all the taxonomies by order of posts. i have a 30 last days/all time field, and when a post exceeds the 30 days limit it goes into draft, so when it is changed into all time ...
0
votes
0answers
11 views

How to display recent comments of a specific taxonomy?

I have a custom taxonomy, for example region. Under this I've added several sub terms, such as Europe, Aisa, America. How do I display the comments for posts aligned to Europe only? Edit: I found a ...
1
vote
2answers
20 views

Getting Taxonomy inside WP_Query Loop

I have written my custom WP_Query and using loop to display post content. I use get_the_category() to display categories of current post and it works fine. Now for some post types there are custom ...
0
votes
0answers
5 views

Additional filters on the taxonomy page

I can't find the way how to add the additional filters to the taxonomy page. I will be grateful for the advice.
1
vote
0answers
12 views

Share the same comments between more pages

Scenario: I need to share the same comments between more pages. Instead of simply using the post ID to load comments, I want to use a combination of two taxonomies' id. For instance: Taxonomy 1: tag ...
0
votes
1answer
22 views

Pass array of taxonomy terms to wp_query

I am trying to compile an array of taxonomies and terms to pass to wp_query, my array looks like this... Array ( [0] => Array ( [taxonomy] => color [field] =&...
0
votes
0answers
31 views

Why does page for hierarchical taxonomy parent term go 404?

I have a custom taxonomy, "type", which is 'hierarchical' => true,. Terms include: "Industry moves" "Market indicators" "Viewpoints" "Analyst view" "Executive view" "Interview" I have a ...
0
votes
1answer
21 views

Get Term ID by Description

I need to return the taxonomy term ID based on the terms description. Is this possible? I know the description along with the term ID is held within the wp_term_taxonomy table. However I was ...
0
votes
0answers
28 views

Taxonomy URL - combine AND “+” with OR “,” operators in the url

In taxonomy URLs, terms can be combined with : "," to express OR (eg : france,england) "+" to express AND (eg : england+2017) Hence, if there exists a custom taxonomy named "mytaxo" with country ...
0
votes
0answers
63 views

How to modify default taxonomy field to a single text field?

Am trying to find solutions but I can't find one. I want to modify the WordPress field in admin specifically the description I want to update it into a single text field.
0
votes
0answers
19 views

Can lots of tags affect performance?

I'm working on a plugin that will auto-tag my posts (it's for a very specific, single project only). It will apply 6 tags based on the content of the post. Forward thinking, I wonder if the number of ...
0
votes
0answers
5 views

How can i add Custom post type as a child to other Custom post type DashBoard

WordPress #WP_Dashboard #Customize_Dashboard How can I add Custom post type as a child to other Custom post type? Example : City is Custom Post Type Area is Custom Post Type when I enter to ...
0
votes
1answer
28 views

List posts that have the current url taxonomy

I created a custom post type "projects" and then I created a taxonomy to categorize my projects "categoriesprojects". I have dedicated a page that lists my projects randomly via WP_Query (archive-...
0
votes
0answers
25 views

How to break up output of posts for different terms on same page?

Background.. My site contains 9,000+ posts of custom post type "article". It has various custom taxonomies, eg. "source", "company" and (article) "type". My taxonomy.php template file does a ...
0
votes
0answers
18 views

How to bulk-untag multiple posts?

I have multiple batches of posts that are wrongly tagged with some terms, they need those terms to be removed. Specifically, I have... Custom post type: "article" Custom taxonomy: "company" (...
0
votes
1answer
35 views

How to show term-specific post list, without posts associated with child terms?

Is this normal WordPress behaviour? I have: Custom post type: "article" Custom taxonomy: "company" (hierarchical) In the backend, when I go to the post list for "Articles", and constrain results by ...
0
votes
0answers
8 views

Custom Taxonomy Permalinks

I'm looking for a possibilities to implement the following. I have 3 custom taxonomies for Easy Digital Downloads plugin: 1) Types: type 1 type 2 type 3 2) Categories: category 1 category 2 category ...
0
votes
2answers
33 views

Listing all custom posts having a specific taxonomy whatever the terms

I'd like to get a list of all the custom posts that belong to a specific taxonomy. I've tried many things including this code, but I get a list of all the posts in the 'members' cpt, and not just ...
0
votes
0answers
46 views

WP REST API - Add post with taxonomy using term_name

Hi there we have API requests hitting our WP site to import posts into a custom post type. In the JSON for the post type the taxonomy "job_sector" is sent through as a string using the terms name ...
0
votes
2answers
41 views

How can I change the output display of my pagination?

How can I change the output display of my pagination? I have been trying for the past few hours to format the output of my pagination links (1,2,3, etc.) to resemble the below: I have been unable to ...
0
votes
2answers
21 views

taxonomy terms, inverted

I have a taxonomy that will be the brand, and the children’s items the template. I have a code in single.php to show the details. <div class="box2"> <div class="faixa"> ...
0
votes
1answer
20 views

Convert attribute woocommerce terms (taxonomy terms) in posts of custom post type

NEED I have a list of terms of attributes in woocommerce, specifically WRITERS: list of writers name. I want to convert writers name in posts of a custom post type, WRITERS. The terms of attribute ...
0
votes
1answer
26 views

HTML in category name

how can edit taxonomy.php in order to stop term sanitizing? I need HTML (font color) in category name. Thanks!
0
votes
0answers
11 views

Call category by brands on brand detail page woocommerce

Can i call category by brand? I want to show category listing instead of products at brand detail page i am using Perfect WooCommerce Brands for my site kindly somebody can help i am new in ...
0
votes
1answer
15 views

WordPress get parent category taxonomy

I'm trying to pull in the parent taxonomy description in WordPress, but seem to be having a little bit of difficulty... this only seems to be pulling in the category of the description of the very ...
1
vote
1answer
54 views

How to check the terms in single custom post type template

I have custom post type called events it has event_type taxonomy with two terms namely past-events, upcoming-events. I want to check my single post's term whether it's under past-events or upcoming-...
1
vote
0answers
22 views

WP Query Args - Title or Taxonomy Value

How do I query by tax_value or title? I have $args = array( '_meta_or_title' => sanitize_text_field(preg_replace('/%20/', '+', $query[1])), 'posts_per_page' => 100, 'post_type' =&...
0
votes
0answers
19 views

Extend categories with post meta

I have categories on my site, that i need to extend them with posts functionality (post meta and all the stuff i can do with posts) but on the other side need to save their term id. Is this possible ...
0
votes
0answers
13 views

Get an array of all the categories and sub-categories of a custom taxonomy

I have a custom post type "apis". This post type has a custom taxonomy "api_category" which has categories and subcategories. What I need to do is get an array of all the categories in this custom ...
0
votes
1answer
17 views

Non editable custom taxonomy

I have reviewed Creating a non-removable taxonomy term but it has not answered my question. One of the built-in Taxonomy terms is the "post formats". This cannot be edited. What I would like to do is ...
0
votes
1answer
34 views

How to return newly added terms when using wp_set_object_terms

I am using wp_set_object_terms to add terms (attributes) to our WooCommerce products: wp_set_object_terms($id, array($migrate_case), 'pa_case'); This gives us the advantage (instead of using ...
0
votes
1answer
35 views

Use get_the_terms to list subcategories of custom taxonomy

Currently I use the following code to output all categories within this custom taxonomy in a custom post type: <?php $args = array( 'post_type' => 'video_cpt', '...
0
votes
1answer
33 views

Dropdown (with onChange) with custom taxonomies

I have multi-select taxonomy field A. When one or more values are selected in A, I want to restrict the choices available in taxonomy field B. So for example: Two Taxonomies called country - "USA", ...
0
votes
0answers
18 views

How can I dynamically filter the choices in a taxonomy select?

More specifically – I have multi-select taxonomy field A. When one or more values are selected in A, I want to restrict the choices available in taxonomy field B. So for example: Two Taxonomies ...