Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
9 views

How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug

I'm setting up "special" url structure for posts etc Result i want to get is: sitename.com/club/justcavali club is term from taxonomy (club_type) and justcavali is post type (booking_type) after i ...
1
vote
1answer
23 views

Display link to taxonomy archive only if it has posts with certain custom field values

Posts on my site describe future events, with the event date recorded in a custom field in Unix time. Generally, only upcoming events are relevant to visitors. As such, I'd like to display ...
0
votes
0answers
10 views

How to add child page to Woocommerce product page?

The goal is "add page to product". ex. bmw.com/shop/i8/ << a Woocommerce product page bmw.com/shop/i8/photo/ << normal page I know Woocommerce have it own page taxanomy, it's not have ...
1
vote
1answer
14 views

Working with Next and Prev links in Single Taxonomy Templates

I am building an art gallery website using a custom post type "paintings". There is a custom taxonomy for categories called "painting_cat" where it can be "studio", "plein air" etc., and another ...
0
votes
1answer
21 views

Get parent category(taxonomy) ID from single template of a custom post type

-Parent-category -Sub-category Want to get parent ID when on the current post of sub-category. Created a custom post type and custom taxonomies for that post type. Created a category and assigned ...
0
votes
1answer
28 views

Only return taxonomies that are linked to a category & product

What's the best way, to return taxonomies, but only taxonomies that are linked to a product, within the category, I have a heirachial taxonomy, I want to get all the top level options, once an option ...
2
votes
1answer
21 views

Get product attribute for Simple product in WooCommerce

I need to get product attributes from product in WooCommerce, type product Simple product, some product can be as dropdown, but much options as radio button. How I can do this? How it possible? ...
0
votes
1answer
27 views

Rewriting url for multiple Taxonomies and Custom Post Type

I have 2 taxonomies ( genre and artist ) and Custom Post Type ( Lyric ) the url structure i want to get is CPT: /lyrics/ - archive page for CPT Artist: /lyrics/artist/ & /lyrics/artist/song-...
0
votes
1answer
23 views

Custom Post Type Categories URL not displaying posts

I'm not as good as many wordpress developers here and I hope someone can help me, I've created a Custom post types for hotel destinations with categories for country and city. When I go to mysite.com/...
-1
votes
0answers
18 views

Wordpress Taxonomy Filter By Parent

I am trying to create a search filter with the parent taxonomies. What I want is that when the brand(lambo) is chosen, the values ​​of type(urus) must be related to those of the brand. Currently I ...
0
votes
0answers
16 views

How collect all taxonomies on one menu

I have some post_types, they have some taxonomies. I want collect all taxonomies on options page and. How collect all taxonomies on one menu "Options"
1
vote
0answers
18 views

How to checked selected category checkbox when my custom post inserted from frontend

if ( isset( $_POST['save'] ) ) { if(wp_verify_nonce($_REQUEST['_nonce'], 'submit-post')){ // $userid = get_current_user_id(); $atts = array( 'post_content' =&...
1
vote
2answers
25 views

Should the actual /category/ directory be 404? Is that normal WP behaviour

I'm not sure if this is 'normal' but on my WP install the actual directory for 'category' throws a 404 error. So, for example, if I had a category called 'apples' then every post or page associated ...
0
votes
0answers
11 views

WPDB Get Array Of Taxonomies With Post Count

I'm trying to get an array of taxonomies with the count of post types using $wbdb. I would like my array to be: [ [term_name] => [post_count_by_term] ] I've started setting up my SQL query, ...
1
vote
1answer
45 views

Get terms ordered by post date

What I'm trying to achieve: get n terms from a custom taxonomy ordered by the newest post in each term. This will be used to display the newest m posts under each term. Is there a better way of doing ...
0
votes
1answer
26 views

custom taxonomy not showing up after adding capabilities upon updating to WP 5.1.1

After updating to WP 5.1.1, my custom taxonomies do not show up under their assigned custom post types. When I comment out the custom capabilities that are attached to these custom taxonomies then ...
0
votes
0answers
22 views

tag cloud and CPT UI taxonomy

I've made a lot of searches and tests to resolve my issue, but I'm still stuck… So here I am! I use the plugin event calendar pro, wich have "organizers". Each organizer has his own page. I use the ...
0
votes
2answers
20 views

Filter Custom Taxonomy Posts

I have a custom taxonomy page, it also has a slider up top. The problem is the slider displays random posts from all taxonomies rather than the current taxonomy. Is there a way to filter the images in ...
0
votes
0answers
8 views

Why is the category item count not updating after assigning a category?

I've created a custom category for items in the media libary. After I programmatically assign a category to an image ID, using wp_set_object_terms( $image_id, $cat_ids, 'my-custom_category', false ), ...
0
votes
2answers
16 views

Custom order of Taxonomy Terms

I'm querying a custom post type and displaying all posts by terms (basically posts by category) as follows, everything is working fine EXCEPT for some reason no matter how I write the tax_query array, ...
0
votes
1answer
32 views

Dynamic CPT / Taxonomy

I use multiple CPT / Taxonomies / Terms in my website. Currently, to customize, and use the good WP template, i've made a taxonomy-$taxonomy.php file for each CPT. But in fact, it's ONLY the CPT and ...
0
votes
0answers
30 views

Allow duplicate slugs for custom post type with taxonomies

I have set up a custom post type (team) and a custom taxonomy (team_tax) for this post type, both with the same slug. Down to the core: register_post_type( 'team', array( 'labels' => ...
0
votes
1answer
54 views

Rewrite custom post type with taxonomy

On my WP blog my goal is to rewrite urls like: domain.com/blog/**name_of_a_city**/title-of-the-article Until now I have all my links written like this: domain.com/blog/title-of-the-article/ Since ...
0
votes
0answers
14 views

Query for get the “Sticky post” of a CPT with 2 taxonomies

I am new in WordPress and I am doing tests, I have created a CPT called ('company') with two taxonomies ('zone' and 'sector'), I want to show me the companies with a certain sector (sector term such ...
0
votes
1answer
30 views

Is it possible to arrange Custom Post Types from CPTUI into a Folder?

I'm using CPTUI to create taxonomies and categories for Facet-WP, which i'm using to sort and filter products on the pages i'm creating. This is the problem i'm facing :- As you can see, the Custom ...
0
votes
0answers
12 views

Taxonomies delete link get_the_terms

I added the taxonomies in my CPT. I taken this in the wordpress codex. Because I want that my taxonomie hasn't link on the a click. The code is okay but my problem i would like delete the place in the ...
0
votes
0answers
23 views

How to display list of most popular posts from custom post type

I have a custom post type for articles with a custom taxonomy for topics. I wanted to keep this separate from the standard Wordpress blog (posts) which is why I created this. I want to show the 3 ...
0
votes
1answer
19 views

Related posts by taxonomies does not work , what could be the reason?

everybody. Related posts by taxonomies does not work , what could be the reason? $tax_IDs = array(); foreach ($tags as $tag) { $tax_IDs[] = $tag->ID; } $args = array( 'post_type' => '...
0
votes
0answers
9 views

Modify taxonomy lookup query on Edit Media page in the wp-admin

I am using a custom taxonomy to link images to a registration system. The way the taxonomy is used, there can be multiple slugs with the same name. When someone adds an image to the media library and ...
1
vote
1answer
48 views

Is echo get_the_term_list and get_field in a template file considered safe?

Is using get_the_term_list and get_field in the manner below consistent with accepted standards for safely displaying taxonomy terms as links in a table and custom field text beneath headings in a ...
0
votes
1answer
24 views

How to approach a site where it has sub-businesses, each with its own pages (“articles”, “staff”)? Don't want to use WP multisite

The structure would be something like this. Main site About Us Our Staff Person A Person B, etc Catering Service About Catering Service Staff of Catering ...
0
votes
0answers
14 views

Custom taxonomy in product url

I have a custom taxonomy for products, which i need to set them in product URLs as well. It will be dynamic. so for example This is what i want. https://example.com/taxonomy_value/product_name Right ...
0
votes
2answers
28 views

Add custom taxonomy for post using cron job

I am trying add custom taxonomy with post using cron job. The problem is since wordpress 4.7, it verify if current user have capability of assigning taxonomy. Crob job don't have the capability. I am ...
0
votes
0answers
27 views

Display first post of a term in taxonomy template

I have my template taxonomy-$taxonomy.php (here, 'catmaison'). In this taxonomy, I have 3 terms ('au-fil-du-temps', 'elaboration-distillation', 'plantes-epices'). Each terms of this taxonomy are ...
0
votes
1answer
26 views

Display 3 level taxonomies

I'm a bit confused how to handle this kind of output. I suppose to display three level taxonomies. When a term is clicked i still need to display his level brothers but also his children's... The ...
0
votes
1answer
29 views

Taxonomie cpt with acf

I have a CPT 'formations'. In the page of one of my formations (single.php) there is a section "other articles". I would like from my editor of each "formation" page, select categories to show other "...
0
votes
0answers
23 views

How to display custom post type pagination buttons when processing AJAX request

Good morning everyone, I am trying to filter posts using ajax by custom fields and custom taxonomy values from a custom post type. Ajax request works fine, It retrieves all needed data to display, but ...
0
votes
1answer
15 views

Why custom taxomony not showing when create a post?

I have created taxomony which are showing in wordpress Menubar in Post tab. But when i create a new post or edit my post it is not showing with categories. Can any one help me out that where i am ...
0
votes
0answers
25 views

Show message if term slug changed

Is there any way to catch changing specific field in custom taxonomy term? For example, i need to show notice in back-end, when slug in custom taxonomies term is changed. I'm reading about edited_term ...
0
votes
1answer
18 views

Live search by custom tag

Live search: $the_query = new WP_Query( array( 's' => esc_attr( $_POST['keyword'] ), 'post_type' => 'custom_type', 'sentence' => 'true' )); if( $the_query->have_posts() ) : while( $...
0
votes
1answer
28 views

Retrieve custom post types by custom taxonomies with WP_Query

I am trying to filter custom post type data using ajax. For that, I display some custom taxonomies as select tags. I've been trying for 6 hours to retrieve custom post types using WP_Query with these ...
0
votes
0answers
22 views

Set a Default CPT taxonomy by taxonomy id

How can I set a default CPT taxonomy by taxonomy id? I don't want to do it by slug. Must be by ID.
0
votes
1answer
29 views

Get post meta value outside of the loop

I'm working on an extra function to list different stuff, My function looks like: "display all hotels for a specific city" -> hotels is as CPT and CITY as custom Tax. So for exemple, lets display ...
0
votes
1answer
28 views

use apply_filters return taxonomies custom post type

I reused the following code where a specific taxonomy is registered: public static function get_taxonomies_to_register() { $taxonomies = apply_filters( 'wp_taxonomies', array( 'wp_course'...
0
votes
0answers
33 views

Custom taxonomy query is empty. 0 = 1 in SQL

I have a weird thing with my custom taxonomy query, I'm searching for posts related to country 'Error'. $taxonomy = 'country'; $term_id = term_exists('Error', 'country'); print_r($term_id); $term_id =...
0
votes
1answer
36 views

Show one post of each custom taxonomy

I am trying to only post one post of each custom taxonomy APP_TAX_STORE my wp_query looks like this: // show all alternative active coupons for this category from related store $tax =...
0
votes
1answer
22 views

Custom taxonomy terms registered not showing when added in child theme

I have registered a new custom post type and taxonoy in my child theme using following code: add_action('init', 'tours_register'); function tours_register() { $slug = 'tour'; $labels = array( ...
2
votes
4answers
143 views

Custom taxonomy terms not showing as list Gutenberg Editor

I have created a custom taxonomy that I have associated to my CPT. both appear on my dashboard, the issue is that when I add content and I want to choose a term from the list of the custom taxonomy, ...
0
votes
1answer
30 views

List posts with slug title

The code is for single-product.php. I can list all products on page but I want to list all posts with slug titles. <?php $args= array( 'post_type' => 'products', 'order_by' ...
0
votes
1answer
22 views

how to display custom taxonomy on an archive page?

<?php get_header();?> <?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; $shahbaz = new WP_Query( array( 'order' => 'ASC', 'post_type' ...