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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

WordPress Multiple Taxonomy Query

I've a simple form made up of two multiple selects which (as if by magic) filters my posts archive with URL parameters: <form class="filters"> <select name="country" multiple> ...
2 votes
2 answers
803 views

Outputting an array of term meta values in a custom WooCommerce tab?

Forgive me – my Wordpress/PHP skills are hilariously rudimentary, so I may not use the correct terminology. I have added a custom tab to the WooCommerce single product page and need it to display a ...
0 votes
1 answer
7 views

Which filters control the Categories page (or a custom taxonomy page) in the Admin?

I have a custom taxonomy. When I go to the page in the admin where it can be managed - edit-tags.php?taxonomy=bundles&post_type=kea_activity I see a table with headings for Name, Description, Slug,...
0 votes
1 answer
718 views

Display posts by alphabetical order

I just purchased a WordPress theme. I’m trying to sort post on one category into an alphabetical listing (glossary type of listing). Example : https://www.udiscovermusic.com/browse-artists/ There are ...
0 votes
1 answer
723 views

Permalink Rewrite to include Custom Taxonomy Term

I've created a custom taxonomy for posts using register_taxonomy( 'discipline', array('post'), /* if you change the name of register_post_type( 'custom_type', then you have to change this */...
1 vote
2 answers
1k views

Hide product categories and taxonomy terms in menu if empty

I've been researching this and had no luck so far. I have a WooCommerce store with a main menu showing product categories (product_cat) and brands (yith_product_brand) which is a custom taxonomy. I ...
0 votes
0 answers
9 views

Using Custom Taxonomy in Default Post Slug

Hoping for some help... This relates to similar questions but with some variation where I haven't been able to get to a working solution. What I'm trying to do I want to use my created custom ...
0 votes
1 answer
711 views

Check if value is a custom taxonomy category name

I'm needing to check a variable and if the slug doesn't match a custom taxonomy's category slug run a function. I can't wrap my head around what I would need to do in order to get the "categories" of ...
0 votes
1 answer
753 views

How to display custom post types AND regular posts separately on a shared taxonomy archive?

I've looked over numerous questions and answers on problems somewhat related to this but can't seem to find the same situation or solution. I have a custom taxonomy that needs to have an archive page ...
0 votes
2 answers
13 views

translating a custom taxonomy term in a shortcode

I tryed this code but the german version is not working (italian is ok) $lang = substr( get_locale(), 0, 2 ); global $post; if ('it' != $lang ) { $term_name = get_the_terms(get_the_ID(), 'intro_'.$...
0 votes
1 answer
753 views

Check if any available product has specific attribute

How can you check if there are any products with a specific product attribute in the shop? I could query (eg. with wc_get_products()) all products and check if they (or their variations) are in stock ...
1 vote
3 answers
1k views

Permalinks when filtering multiple custom post types by single taxonomy

I've been working with Custom Post Types and Custom Taxonomies for ages but one thing I can never get right are the rewrites when applying a shared taxonomy to multiple CPTs. For instance, I have ...
0 votes
1 answer
709 views

How to add meta fields to custom taxonomy add/edit page?

I have a custom taxonomy 'issue'. I tried to add some meta fields to the add/edit issue pages in the dashboard using the method explained by Ohad Raz (https://en.bainternet.info/wordpress-taxonomies-...
0 votes
1 answer
863 views

How To Create Dynamic Permalink To Custom Taxonomy List of Current Posts?

I'm looking for help with a problem I've run into and can't seem to workout myself. I have created my own custom taxonomy called series (code below). I am calling the custom taxonomy posts in a widget ...
1 vote
1 answer
3k views

Custom post type Permalinks with hierarchical Taxonomies

I Would use Custom Post Type and hierarchical Taxonomies with same Slug. Fortunately I found a good solution based on post_type_link filter here from TheDeadMedic. mysite.com/products/category1/...
0 votes
1 answer
36 views

Remove slug and custom post type name from URL

I have a custom post type "treatment", under this CPT the taxonomy "treatment_category" which forntend slug is "category" right now the URL for category displaying as ...
0 votes
2 answers
10 views

how can I get the selected term of a custom taxonomy

Taxonomy name is "intro". I'm inside a shortcode so I dont need to echo.I need a variable for the selected taxonomy term to put in the return. What I do has no effect $terms2 = ...
1 vote
2 answers
726 views

browse by category and tags?

I have a custom post type called freebies. This custom post type has its own taxonomy with the "normal" categories from wordpress, (which are child-categories from freebies) and own custom taxonomy ...
1 vote
2 answers
2k views

How to add taxonomy to Users menu in admin?

I want to create a taxonomy that is related to the users, therefore I'd like to show the taxonomy under "Users" menu within wordpress admin. In codex there's a mention that you can attach taxonomy to "...
0 votes
2 answers
19 views

Is there a way to create a single rewrite rule to handle multiple variables depending on what is present?

I have the following rewrite rule to handle when all arguments are present: add_action('init', 'ebd_custom_rewrite_rules'); function ebd_custom_rewrite_rules() { add_rewrite_rule('^shop-region/(.*)...
0 votes
1 answer
190 views

How to make multiple custom taxonomies sit under custom post type slug?

I have a custom post type called resources which has been registered as so: register_post_type( 'Resources', theme_build_post_args( // $slug, $singular, $plural 'resources', 'Resource', '...
3 votes
1 answer
2k views

Search by type posts and taxonomy

I want that my search page give results of posts (that i want that show) and taxonomy The code to get just two type of posts: function searchfilter($query) { if ($query->is_search &&...
0 votes
1 answer
1k views

ACF - Retrieve custom taxonomy from a relationship field

I have a custom post type, called prognosis with 3 custom taxonomies, Country, Competition, and Sport, I've also added a few ACF custom fields. I have another custom post type called analysis with an ...
0 votes
1 answer
1k views

List all posts from custom post type by taxonomy

Having custom post types with taxonomies. Lets say I have a custom post type "Products" with taxonomies "new", "old", "fashion". Now I have a Nav where I can click on wordpress.private/products/new/...
0 votes
3 answers
1k views

Query posts by multiple custom fields

I have made two dropdown list which is a custom fields. Custom Field 1 :- industry Values of Custom Field 1 :- financial_services,ecommerce,insurances, etc. Custom Field 2 :- primary_functionality ...
0 votes
1 answer
733 views

How to display only child category post in related posts in custom post type?

I'm trying to display only those posts which are under the same category of the post which I have clicked as related posts. My custom taxonomy are like this : Fsc year 1 => Biology => Bio chapter 1 . ...
1 vote
1 answer
2k views

Displaying posts exclusively in their category (not parent)

I am using a custom post type to add/display PDF documents (posts) on my website. taxonomy - wpl_documents_category post type - post_documents All is working well. However, I want to display the posts ...
0 votes
2 answers
2k views

How to filter custom post data with AJAX?

I have build a custom post_type with "Resellers" in order to enter my personal reseller items. The "Resellers" post have taxonomies like "Countries" and "Departmens". I am running into a problem: ...
0 votes
1 answer
16 views

Filter on one post type with taxonimy and get other post type

I would like to fetch my posts of type 'news', 'videos', 'webinars', 'whitepapers', 'testimonials', and 'landing-pages' and apply a "filter" to only get the landing-pages type with the ...
0 votes
0 answers
6 views

How to get the proper category in permalink with custom post type assigned to multiple categories

I was wondering if you could help me with the following issue. I have read a lot of cases, but couldn't trace anywhere good answer which explain, how this works. I created a custom post type: project ...
0 votes
1 answer
868 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
2 answers
823 views

Limit taxonomy terms added to a custom post type

I've created a Custom Post Type and a Custom Taxonomy. In WP Admin, how can I limit amount of taxonomy terms that are added to the custom post type? I want to add no more than one tag into the post. ...
4 votes
1 answer
1k views

Custom taxonomy on permalink

I have a long time problem and look forward for your help. I have a custom taxonomy of "city" (it is no hierarchical like tags). I just would like my URLs to look like this: /%city%/%category%/%...
0 votes
1 answer
21 views

ACF - Tags not showing up in Custom Post Types

I have a tags taxonomy and then I've added it to my CPT, however it does not give me the option to add tags to my CPT now. How do I get it to do that?
0 votes
0 answers
9 views

Set Variant options/attributes values on WooCommerce

I can insert variant options/attributes with no default values(variant name) in order to display following Variant options area with selected attribute names(Renk,Beden) on the product, by using ...
0 votes
1 answer
1k views

How to prefix custom post type URL with custom post taxonomy term?

For one of my CPT, when default permalink looks like example.com/CPT_slug/%postname% instead I would like a permalink like this : example.com/%custom_taxonomy_term%/CPT_slug/%postname% With regular ...
1 vote
1 answer
1k views

I am trying to hide a custom post type category to logged in users with Pre_Get_Posts

I have a custom post type in my theme called portfolio. It's categories are called project-categories. I am trying to exclude a project category for logged in users. I cannot get this to work at all. ...
1 vote
1 answer
801 views

Is it possible to store Json data in post_meta and manipulate

I just want to add json data type in post meta field as like in normal database. json data will be in the structure below, Post Name Meta Data 1.Sample title 1 ---> ...
0 votes
1 answer
2k views

Filter Custom Post Type Posts by Taxonomy

I created a custom post type named "listas" and a custom taxonomy named "taxolistas". I would like to fix this function from the plugin Thumbs Rating to make it filter posts by custom taxonomies ...
0 votes
1 answer
30 views

Hide load more button if no more post in selected category

I have built a ajax post loading program in wordpress where i load post depending on category and current post type. ive got it all working except hiding the load more button if no more post. ive been ...
0 votes
1 answer
1k views

Get a list of categories ids

I'm working on a portfolio with filters based on custom post type. That filters must display only categories for the posts that are displayed in the portfolio, since user can specify them by id in the ...
0 votes
1 answer
1k views

I cannot get tax_query in get_posts() to work with custom taxonomy

I have been trying to achieve this for the past two days but nothing works. I am attempting to build functionality to search any post, page, and a couple other custom post-types by a tag. I have ...
0 votes
1 answer
900 views

Rewrite/Change custom taxonomy slug

I want this url: => mydomain.com/genre/chant to be rewritten as => mydomain.com/chambers/chant. I want the users to access mydomain.com/chambers/chant instead of mydomain.com/genre/chant. genre ...
0 votes
1 answer
14 views

get total post in category via ajx

Aim The total to be equal to the amount of post within the selected category or sub category. What im getting I am getting 0 when trying to get the number of post available in a category. My aim is to ...
0 votes
3 answers
1k views

Filter "get_terms" query

I'm currently getting the data from a custom taxonomy using this: $terms = get_terms(array( 'taxonomy' => 'my_custom_taxonomy_name', 'hide_empty' => true )); Now, this returns a lot of ...
0 votes
1 answer
1k views

Issue on adding Icons to Custom Post Type

Can you please take a look at following code and let me know why i am not able to add icons to custom post type? add_action( 'admin_head', 'my_icons' ); function my_icons() {?> <style type="...
1 vote
1 answer
2k 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' ...
1 vote
1 answer
1k views

List Taxonomy Terms based on another Taxonomy

I have a custom post type called Resources. Resources post type has two different taxonomies associated with it, Resource Types and Resource Tags. Resource Types sets the format/type of the resource ...
0 votes
1 answer
964 views

Orderby taxonomy term id using get_posts not working

I'm looping through a series of custom post types and then grouping those by a taxonomy term. That is working great, however I have not been able to order these groupings by term_id. I used a ...
1 vote
2 answers
1k views

Is there a template file to list all terms of a given custom taxonomy?

Suppose we registered the composers and the interprets custom taxonomies. The composers taxonomy could have the following terms: Wolfgang Amadeus Mozart Ludwig van Beethoven Richard Wagner The ...

1
2 3 4 5
90