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 [custom-taxonomy]

Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.

0
votes
0answers
16 views

Pretty Permalinks with CTP and Taxonomies / Hierarchical

My Site has 2 Custom Post Types with a 2 Taxonomies. One taxonomy is “Location” which is 2 level / hierarchical (Country, City). My goal is to get our Post Types & Taxonomies in a SEO Pretty ...
0
votes
0answers
23 views

Automatically populate custom taxonomy with a value from a custom field

I'm working on a real estate website, and right now we have a feed importing new regional listings automatically (RETS feed). Certain fields in the 'properties' post type that comes with the real ...
0
votes
0answers
22 views

Plugin architecture to implement machine tags? [on hold]

I'm new to Wordpress, but not to development and I was hoping to get some advice on how to implement a somewhat complex tagging feature within Wordpress. What I'm wanting to do is called machine tags ...
0
votes
0answers
13 views

Wordpress wp_set_object_terms() not working fully with WooCommerce

My custom taxonomy (WooCommerce attribute) already exists and I am using the following to add a new term to the taxonomy and associate it with my WooCommerce product: wp_set_object_terms($product_id, ...
0
votes
2answers
29 views

Query a custom taxonomy in a function to create an csv file

I a problem with getting the query for custom taxonomy to work in this function. The $filter is filled with data but the get_posts() does not use it? The query works without the tax_query and there ...
1
vote
1answer
9 views

Show listings from Impress Listing plugin in random order using taxonomy and terms

I am not able to get the listings to show up. I have verified the slug for the post type and the taxonomy. This code I know works because I have used it for other post types and taxonomy's. Any ...
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
9 views

woocommerce product sorting based on custom fields

I am trying to add a custom sorting option for woo commerce . So I am using following code to add new sort option plus set it as default meta key is '_am_cat_sort' function ...
0
votes
0answers
14 views

Product with Variations has blank attribute selectors. What am I missing?

I've made some code to synchronise products with a feed. It creates or updates products and variants with stock/price info etc. I was using a "custom product attribute", i.e. is_taxonomy => 0 in ...
0
votes
0answers
33 views

Add term to taxonomy programatically

I have a 1000+ terms I need to add to a taxonomy called county. I am trying to use this function wp_insert_term but the term is not being added to the database. I am running this code inside function....
1
vote
2answers
20 views

Wordpress loop: Show only a Custom Post Type Taxononmy TERM

Before I start, I have to say that I have tried to solve my problem in a thousand different ways and I have read several posts without success. I have a CPT called "grouped", a taxonomy for that CPT ...
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
21 views

How to filter a page title with custom taxonomies

I'm trying to hook a page title using is_page() and its ID 1637 along with two taxonomies serie and area. But I can't get it to work. am I missing something code: add_filter( 'wp_title', '...
0
votes
1answer
18 views

Display a colour of custom taxonomy on the page

I've created a custom taxonomy called "colour" // Taxonomy add_action( 'init', 'create_colour_taxonomy' ); function create_colour _taxonomy() { $labels = array( 'name' ...
-1
votes
1answer
17 views

i need to show featured post on custom taxonomy page

i need to show featured post on custom taxonomy page above default loop but not showing feature post its showing all post $args = array( 'posts_per_page' => 3, 'post_type' =...
0
votes
0answers
19 views

How to change custom categories term links?

I have created "Tour Vacation"(tour-vacation) custom taxonomy and added below terms Africa (africa) Canada (canada) Europe (europe) US (us) I want change this terms links. Current link is: https://...
0
votes
0answers
7 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.
0
votes
0answers
19 views

How to combine two different taxonomies into one archive page

I'm developing a site with a need to create archive pages that combine two different taxonomies and have been having a hard time narrowing in on a working solution. Below is an example of what we are ...
0
votes
0answers
15 views

Create a taxonomy of a custom post type in another custom post?

So sorry if this has been asked before, I've tried searching and I can't figure it out (very new to wordpress). I've got a custom post type called Members, and a custom post type called Insights. I ...
0
votes
0answers
19 views

Display posts from a custom taxonomy

So I want to display on some blog posts some related Woocommerce products. But I don't want to manually select the products each time, so I created a custom taxonomy with pods, name group, then on ...
0
votes
1answer
24 views

Body class to each level of a hierarchical custom taxonomy

How would this be adapted to apply to specific custom taxonomies? add_filter( 'body_class', 'custom_cat_archiev_class' ); function custom_cat_archiev_class( $classes ) { if ( is_category() ) { ...
0
votes
1answer
21 views

List all taxonomies with their descriptions

I have this snippet below that lists all my categories in linked hierarchical order and their descriptions. I was hoping someone could update it to allow for a specific custom taxonomy instead? ...
0
votes
1answer
13 views

Display a specific hierarchical level of a specific custom taxonomy

How do I adapt the following snippet to apply to a specific custom taxonomy? It current applies to post categories I use the function below with this: <?php display_cat_level(X,true); ?> in my ...
0
votes
0answers
29 views

wp_dropdown_categories - Populate a second dropdown with filtered categories

I am new to advanced wordpress development so please be gentle :-) I am looking for advice or help with a problem I have. I am reaching out to ensure I do this in the best way possible, not to be lazy....
-1
votes
1answer
20 views

WordPress custom post type and taxonomies

I'm in need to create a simple real estate listing taxonomy with custom post type for properties that I'd be listing on a website. I don't need any of the fancy things you see on some of the real ...
0
votes
2answers
19 views

Display Custom Taxonomy names

Im trying to display a custom taxonomy for a custom post type. So this taxonomy is specific to this custom post type. Unfortunately I cant get them to display. Here is my code in functions.php to ...
1
vote
0answers
20 views

How can I made custom taxonomies relationship?

I create two custom taxonomies: Category (Cars, Pets etc). Region (New York, Washington etc). Now I need to do archives like {Category} in {Region} (for ex. Cars in New York) and get slugs for it (...
2
votes
1answer
26 views

Bulk 301 redirect for custom post type

I've amended the URLs for my custom post type from: url.com/jobs/job-name to url.com/jobs/job-location/job-name Problem is, because this isn't a standard rewrite wordpress doesn't do the 301 ...
0
votes
1answer
19 views

ACF Field, hide taxonomy title and image when no nothing selected in post

I have added a custom taxonomy image through ACF. My code is as follows. <?php global $post; $tax = 'directory_features'; $terms = get_the_terms($post,$tax); foreach( $terms as $...
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
19 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
13 views

404 error when using pagination with custom taxonomy of a custom post type

I'm using a plugin called Custom Post Type Permalinks to my URLs pretty -> sitename.com/CPT/taxonomy. When I apply paginate_links() to taxonomy.php the function seems to works as it produces the ...
0
votes
0answers
15 views

edit-tags.php custom taxonomy term list count link doesn't work when custom taxonomy is registered to multiple CPTs

On the edit-tags.php admin page for a custom taxonomy which is registered to multiple custom post types the count link's count is updated correctly however the link doesn't go to an admin page that ...
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.
0
votes
0answers
13 views

How do I show a list of terms' posts, grouped by a secondary taxonomy?

Let's say I have custom post type article. I have a custom taxonomy fruit, with terms like apples. And another custom taxonomy company, with terms like juicy-inc and crunchy-co. Both are associated ...
0
votes
1answer
25 views

Customise Permalink Structure For Custom Post Types

I've installed the Custom Post Types UI plugin and have made a post type and taxonomy. When I click 'add new' to make a new post the slug always defaults to:- https://domain.com/custom-post-type/post-...
1
vote
1answer
18 views

How to start a new post with custom Taxonomies already set?

Is there a way to start a post and have some default terms already added to the taxonomies?
0
votes
0answers
27 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 ...
2
votes
1answer
98 views

Custom permalink - append taxonomy name and term name at the end of permalink

I have custom post type -> resources custom taxonomy -> resources_type I want custom permalinks where category base will be appended at the end instead of front For example: I add a new ...
0
votes
0answers
55 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
1answer
23 views

custom hierarchical taxonomy and custom post type list contains surplus posts

I wish to list custom taxonomy terms as titles and custom posts as lists under titles: Basics List item1 List item2 Movies List item3 Images List item4 However, custom taxonomy is HIERARCHICAL ...
0
votes
1answer
35 views

Multiple Custom Post Type in Taxonomy Archive Causing White Screen

So basically I'm trying to add multiple custom post type in my taxonomy archive. Here's my code: <?php $args_trip = array ( 'post_type' => 'trip' , '...
0
votes
1answer
6 views

Display custom tags for custom post listing page

I'm very new to WordPress, but I've created a custom post type with two sets of tags. I've added the tags by using the following code: /** * custom tags */ function gccsi_create_client_tax() { ...
0
votes
0answers
5 views

Display post from child category

I got a code here where it post all my custom categories then if you click a category if the category has child category it will display all the child and if there is no child category it will display ...
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
11 views

Adding a Section for Visitors

I habe a basic dog care website where I would like to have a lost dog section where visitors can post about their lost dogs with pictures and custom fields like communication and location info. But ...
0
votes
0answers
25 views

How to display custom post type by category or tag on home page?

I found this code, which should display 'ai1ec_event' on home page, with with it's taxonomies. I have own custom post type 'event' which have category -'event_cat' & tag 'event_tag' . How to ...
0
votes
1answer
30 views

Custom Category Walker with Image, Fallback to Most Recent Post in Category Image

Based on this and this answer I am developing an extension of the Walker_Category which displays in image from an ACF field, falling back to the latest post's thumbnail. I have included the entire ...
0
votes
1answer
27 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-...