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
14 views

wp_set_post_terms doesn't allow to manually add new terms [closed]

So I'm creating a function which based on the selected category for the post, it automatically adds terms (tags alike) to that post. It works fine, the problem is now the post has those terms and if I ...
user avatar
0 votes
1 answer
16 views

How to add/enqueue Custom CSS for a custom taxonomy page?

So this is what I have done for my homepage so I load css that only loads on my homepage function enqueue_frontend_assets(){ if(is_page_template( 'homepage.php')) { wp_enqueue_style( '...
user avatar
0 votes
0 answers
35 views

Get all taxonomy terms for attachment, get_terms does not work for me [duplicate]

I have created tags and category for my media attachments with a function like this register_taxonomy( 'gallery-tags', 'attachment', array( 'labels' => array( 'name' ...
user avatar
  • 624
0 votes
0 answers
16 views

"Menu order" being ignored when querying posts from a parent taxonomy with "include_children" set to true

I have a CPT of articles and a custom taxonomy of collection. This is how the articles are assigned to the collections: Collection 1 Article 1 (menu_order = 1) Article 2 (menu_order = 2) Sub ...
user avatar
0 votes
0 answers
7 views

Shortcode to show the terms from the current post (custom post type & custom taxonomy)

I want to show the terms that have been selected on the current post. Term names with links to the term page. I need it as a shortcode. I've found many solutions for the default posts/taxonomies, but ...
user avatar
  • 101
0 votes
0 answers
26 views

Custom Post Type with Different Sets of Post Content?

I have a custom post type called "Industry" and want to allow for a given Industry post to have different sets of post content depending on "Region". The post type would have a ...
user avatar
  • 217
0 votes
0 answers
11 views

Rename existing cpt and taxonomy with new textdomain

I'm developping a small plugin to rename existing custom post type from a theme (Divi). I use this code : add_filter( 'register_post_type_args', 'rename_project'); function rename_project( $args, $...
user avatar
1 vote
0 answers
11 views

How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT

What I have: example.com/movies/{post} <!-- custom Post Type single post, e.g. /movies/batman --> example.com/genres/{term} <!-- custom Taxonomy single term e.g. /genres/action --> What ...
user avatar
  • 11
0 votes
0 answers
13 views

Unique taxonomy for post

I want to have the possibility to select only one taxonomy per post and not multiple taxonomies ; I have found this article about this, but I found it a little bit complicated. https://sudarmuthu.com/...
user avatar
0 votes
0 answers
31 views

get_the_terms has strange result since version 6.0

Since version 6.0 of WordPress some of my code with get_the_terms() doesn't work as expected in several sites where I use custom query loops. For example I have this loop where I want to get the ...
user avatar
0 votes
1 answer
28 views

Getting taxonomies associated with a specified post type

Is that possible right now? Running: wp.data.select('core').getEntityRecords('root', 'taxonomy') Lists all registered taxonomies, same result with: wp.data.select('core').getTaxonomies() Can I pass ...
user avatar
  • 1,241
0 votes
1 answer
22 views

How to display posts from custom post type category(custom Taxonomy) wise?

I have created a site where i have a custom post type as Resources. I have a custom taxonomy(Resources Topics) attached to it. I want to show them in a card system where there will be taxonomy image, ...
user avatar
0 votes
0 answers
14 views

How can I loop at a Specific Taxonomy from a custom post type?

So I am stuck because I want to loop through post from a SPECIFIC taxonomy. So the Taxonomy is "State" and the post type is "Attorneys" . I have a bunch of attorneys that are in ...
user avatar
0 votes
0 answers
18 views

How to associate a custom taxonomy to a post multiple times

On my Posts, I'm trying to associate a custom taxonomy to it multiple times. The example is that I have a User taxonomy and a Post which is like an event. I want to be able to associate the User ...
user avatar
  • 1
0 votes
1 answer
11 views

Problem with sorting in custom child taxonomy archive page

I have this code: <?php $term = get_queried_object(); $term_id = $term->term_id; $taxonomy_name = $term->taxonomy; $termchildren = get_term_children( $term_id, $taxonomy_name ); foreach ( $...
user avatar
  • 11
0 votes
0 answers
17 views

Woocommerce Custom Meta Boxes- How to only display if they actually have content

I've managed to add two custom meta fields to the backend of woocommerce, shipping and size guides, using the add_meta_boxes function, as I don't want to use the woocommerce custom fields section as ...
user avatar
0 votes
1 answer
27 views

Trash Bin for Categories?

I have a cat_notice taxonomy, where there are several categories and one of them the slug is 'trash'. In this case I created a link and I needed that when I clicked on this link I would take the ...
user avatar
0 votes
0 answers
16 views

Hi need update in my terms for other taxonomy

I'm new to wordpress, and in this case I created 2 taxonomies, cat_notice and trash_notice, what I need to do is when I delete a term, instead of it being deleted, it is reinserted in another taxonomy ...
user avatar
0 votes
0 answers
37 views

How to get post count of specific taxonomy that have store name & category

I am new in php and trying to learning php. I have taxonomy called dealstore. I have added one store name "Amazon" and two categories name "coupons and electronics". Now, I want to ...
user avatar
  • 1
0 votes
0 answers
16 views

how to create hierachial taxonomy and manage under single post type?

i have created Farmers Post type for managing farmers data in wordpress. now i want to create hierarchical taxonomy as below: ->state ->district ->g.panchayat ->village ->farmers Please ...
user avatar
0 votes
1 answer
16 views

Auto Generate Post Title from 2 Custom Fields

I would like to generate the post title from 2 custom fields, 'job', which is a taxonomy, plus 'date' which is a date picker, not the date of the post. This is for a custom post type called 'job-...
user avatar
0 votes
1 answer
17 views

Custom taxonomy - checking if name includes a declared value

Can anyone help me adapt the below which creates a set of <LI> elements with custom taxonomy categories created in a custom post type I have. What I want to achieve is to only list the 'project-...
user avatar
  • 101
0 votes
1 answer
25 views

custom post type, hide or disable the status line in publish meta box

I have been adding a post type to my theme, how do I hide/disable the status line (All of it) as in image
user avatar
0 votes
0 answers
13 views

Custom taxonomy permalink without term, redirection to CPT slug

I have set up a custom taxonomy categorie and i have the associated CPT devis. My permalinks : https://www.website.com/categories >> Go to CPT archive https://www.website.com/categorie/...
user avatar
0 votes
0 answers
9 views

How do I make a request in my browser to search the CPT taxonomy?

How do I make a request in my browser to search the CPT taxonomy? Custom post type "portfolio" Taxonomy "portfolio_entries" Tag "new" The request in the browser of the ...
user avatar
0 votes
0 answers
19 views

Get product categories and add them to a custom taxonomy

I'm working on a WooCommerce webshop. I have divided all my products into categories. Example: Clothing: -Tshirts -Jeans -Etc. Likewise, all brands are also divided into categories. Example: Brands -...
user avatar
  • 1
0 votes
1 answer
14 views

Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?

I'm trying to create a dropdown selector on my CPT and CT archive page for a custom taxonomy called "location". I've managed to get the form to submit, however, it does not direct me to the ...
user avatar
0 votes
0 answers
10 views

How to change the author box selection on a post to a custom taxonomy

So instead of the author section pulling in 'Users', I need to change it so that the author box displays a selection of the terms from a custom taxonomy I have made. Is this possible to change?
user avatar
0 votes
0 answers
16 views

How to Implement Search Functionality?

<div class="col-lg-8"> <div class="row"> <?php $search_term = get_search_query(); $term = ...
user avatar
  • 1
0 votes
1 answer
65 views

How to add custom meta to 'pre_get_terms'?

I have a custom taxonomy with custom meta. I have added the custom meta values to columns in the admin list page just fine. But if I search for values that are in these columns nothing is found. I'm ...
user avatar
  • 281
1 vote
1 answer
31 views

list/consult Taxonomy only for the respective author/creator in dashbboard

I'm trying to filter so that only the creators of the respective categories can edit them. I created a cat_author meta field and associated it to the taxonomy. In this way, every taxonomy has an ...
user avatar
0 votes
0 answers
38 views

WordPress: Export/Import Yoast meta title & description to custom taxonomy

I want to export the Yoast meta title & description from a custom taxonomy with the WP All Export. Unfortunately there is no direct way with the plugin to do that. There is an extra WP All Export ...
user avatar
  • 145
0 votes
1 answer
23 views

Is there a way to nest taxonomies or custom fields deeper than one level below the post type?

In Wordpress we can create a post type which can contain taxonomies (or custom fields). Can these taxonomies (or custom fields) contain anything? For example other taxonomies or something else? If I ...
user avatar
  • 103
0 votes
1 answer
40 views

How do I disable the built-in editor and automatically configure the properties of new pages?

I use a Builder plugin on the site. Members are editors and can create their own page. I want to disable Gutenberg so that they can only edit pages with Buldir. I would also disable the properties of ...
user avatar
  • 3
0 votes
0 answers
53 views

Archive page of taxonomy returns a 404 error

I'm trying to create a template file for a custom taxonomy archive page but I keep getting a 404 error when trying to access that archive page. Basically something like: domain.com/quizzes/quiz-levels/...
user avatar
0 votes
1 answer
27 views

Custom taxonomy throw error 404

So in my homework I was given code example and it works for teacher, but not for me. So from what i understand that I'm creating custom post type and custom taxonomy for it, also there is filter that ...
user avatar
1 vote
0 answers
24 views

Choose whether to automatically add a taxonomy with the same name as the post

I created a custom taxonomy within the blog post. It's called "FootNotes." I would like there to be a checkmark inside in the creation of the post that asks me "Are there any notes ...
user avatar
0 votes
0 answers
55 views

using wp_insert_term to create custom terms for a custom taxonomy from frontend form,

I have a form which allows certain roles to add custom terms to a taxonomy. My taxonomy is called Genre (slug genre) <form method='post' enctype='multipart/form-data'> <input type="text&...
user avatar
2 votes
2 answers
230 views

How get custom field from custom taxonomy?

I need to list all categories and their respective posts. Each taxonomy has an image created by ACF in jetengine plugin. I created the loop that returns the list of categories and posts for each ...
user avatar
0 votes
1 answer
18 views

Take a custom taxonomy value and save as a standard Product Tag

I'm trying to find a way to take a custom taxonomy value, and add it as a tag to that same product. Long story short: a third party CRM only respects woo native categories & tags, so we'd like to ...
user avatar
0 votes
1 answer
28 views

Dynamically insert code to custom post type loop

I need to display post from custom post type name "film", from a specific taxonomy "Horror." Everything work fine when I type the taxonomy directly like this: <?php $blog = ...
user avatar
0 votes
1 answer
24 views

how to show records that don't have custom meta value

Running pre_get_posts, I want to order the items by a custom meta value. The problem is that by default this doesn't exist. Only if a user performs a certain action does the meta key/value get added. ...
user avatar
0 votes
0 answers
14 views

How to have multiple search result pages in wordpress with taxonomy terms listed

I am using a custom theme which has custom post types. First one is Doctors another is Hospital. Both doctors and hospitals have a common taxonomy named specialities. Each speciality has some services ...
user avatar
0 votes
1 answer
29 views

Set term on an attachment using wp_set_object_terms and want to display the full term text but it's showing a slug instead

I have a form that visitors use to upload files and fill out information about them and a function that adds those files to the media library and set various fields (including some custom taxonomies) ...
user avatar
  • 166
0 votes
1 answer
25 views

Custom Post Types not queried in Custom Taxonomy archives or Native archives

I have declared a selection of custom post types as an array, allowing post_tags but not categories: // Add Multiple Custom Post Types add_action('init', 'all_custom_post_types'); function ...
user avatar
  • 29
0 votes
0 answers
23 views

How to implement very unusual wordpress routing structure?

Been trying the last two weeks to setup an unusual routing structure for a WordPress website but cannot manage to make it work. Basically there is a custom post type that will get the post url based ...
user avatar
  • 1
0 votes
1 answer
23 views

Custom post type category link redirecting to 404 page

I have created a custom post type. There is no issue with post and it's working. I am getting issue in the catgory links. When i click on the Category name it's redirecting on 404 page I am getting ...
user avatar
0 votes
0 answers
12 views

Change Dropdown jQuery to show/hide but with default place holder that shows all

How to set the jQuery so if default "Department" is selected show all, and only hide all else one other section made. for example, if non selected will be "Department", if "...
user avatar
  • 105
0 votes
0 answers
32 views

How to fix select filter on category

I created a filter where I can filter on different types of machines by a custom taxonomy. It shows the right taxonomies in the filter and after submitting the right url is shown. Problem is that ...
user avatar
1 vote
1 answer
25 views

Add custom taxonomy to post content body?

I've built a CPT that has three different custom taxonomies, I've also built a custom search form that has fields for each taxonomy, and a field for "search by keyword". I want the taxonomy ...
user avatar

1
2 3 4 5
88