Questions tagged [register-taxonomy]

The tag has no usage guidance.

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

Showing custom post type categories in the menu

here is my custom post type and category: //Register nav register_nav_menus( array( 'main_nav' => 'Main navigation' ) ); //Custom post types add_action( 'init', 'create_post_type' ); function ...
0
votes
0answers
9 views

Woocommerce Product don't return custom taxosonomy when using REST api

I created a custom taxonomy for woocommerece product. It's working fine in wordpress. but when I try to fetch it through REST (Javascript), it's missing. All other properties are returning but not ...
1
vote
2answers
96 views

how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?

I would like to add a post_meta (test_meta_1234) field to an existing CPT (organizer) of an external plugin. With register_meta() it doesn't work. But a taxonomy I can add to the same CPT with ...
1
vote
1answer
28 views

Custom taxonomy forms for user profile

I followed this excellent tutorial made by Justin Tadlock . I can't update profile, it doesn't save to user profile : add_action( 'init', 'create_profession_tax' ); $post_type = get_post_type(); ...
0
votes
1answer
16 views

How to show the category filter that's shown on the 'All post' pages on a custom post type page in the admin area?

I suspect this is easy to do. but that I'm simply overlooking something somewhere in the documentation. If you have your normal 'All posts' page in the admin area, then it shows 'Bulk Action', 'All ...
0
votes
0answers
39 views

How to Create taxonomy using 'null' for $object_type?

I tried creating a taxonomy using null for object type so that I can enable it for my suitable post types. add_action( 'init', 'create_pricat' ); function create_pricat() { $labels = array( ...
0
votes
1answer
24 views

CPT Taxonomy As Archive Page – Error 404

I have a CPT called Clubs. To 'categorise' posts depending on if clubs are in the same league or cup competition (or neither), I also have a custom taxonomy called Opposition. To show which clubs are ...
0
votes
0answers
24 views

Include CTP slug to custom taxonmy URLs

I am trying to rewrite a custom taxonomy url to include the CTP slug to which the taxonomy is assigned to. For example: https://www.example.com/motors/taxonomy-slug/ Where motors is the CPT slug ...
0
votes
1answer
27 views

Display the taxonomy name of the current term

I have a hierarchical taxonomy with lots of terms in hierarchical order. No matter what term i'm viewing I'd like to be able to display the custom taxonomy name (as per what i've registered it as ...
1
vote
1answer
39 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
1answer
267 views

Register non hierarchical taxonomy and the show meta box in the post type

I am trying to show a meta box in my product post type, but I'm getting this warning error... Warning error... Warning: call_user_func() expects parameter 1 to be a valid callback, no array or ...
0
votes
1answer
44 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 ...
1
vote
1answer
534 views

404 for a custom taxonomy?

Why do I get 404 for my custom taxonomy? add_action('init', 'custom_taxonomy_flush_rewrite'); function custom_taxonomy_flush_rewrite() { global $wp_rewrite; $wp_rewrite->flush_rules(); } ...
18
votes
1answer
15k views

How to modify a taxonomy that's already registered

Today I needed to change the arguments on a custom taxonomy that was already registered by a third party plugin. Specifically I wanted to set the show_admin_column argument to true and change the ...
0
votes
1answer
31 views

How to get my register taxonomy

My taxonomy register_taxonomy( 'king_blog_category', 'king_blogs', array( "hierarchical" => true, "label" => "King ...
1
vote
2answers
939 views

Add multiple custom post types in functions.php, but only one custom post type show in dashboard

I am new to wordpress, and I am trying to add multiple custom post types in the functions.php. Adding one cpt is fine. but if I use the same function to add the second cpt (with just a change of the ...
0
votes
0answers
50 views

wordpress does not see the correct custom taxonomy hierarchy

I have created custom post type - 'portfolio' with custom taxonomy designating the category and subcategory. I have an example structure: - main_category: -- subcategory_1 -- subcategory_2 The ...
1
vote
3answers
793 views

Register Taxonomy earlier so it can be used in functions.php and admin-ajax.php

This is a follow up to this post, outlining why I can not use the get_terms function while in functions.php (actually calling via ajax/admin_ajax.php). I can grab the terms (custom tax) on any post, ...
0
votes
0answers
183 views

Custom Taxonomy Not Being Recognized by is_tax()

I created a taxonomy.php template that works fine for the default stuff, but I realized my theme has default'd to index.php when trying to load a custom taxonomy I created (IE: open website.com/age/...
0
votes
0answers
493 views

URL with Hierarchical Taxonomies and same slug for all terms and sub-terms

I have a 'house' cpt and a 'locations' hierarchical custom taxonomy. Permalinks are set to /%category%/%postname% The terms in the hierarchical taxonomy are like: usa >> new-york germany >> berlin ...
0
votes
2answers
123 views

Custom Taxonomy template not display

I am having problem when I want to display my taxonomy template. I have created one custom taxonomy 'Location' for my custom post type 'Project'. Moreover, I have created templates for it as : ...
0
votes
2answers
87 views

Is there a way to re-order the Custom Taxonomy drop-down on a Custom Post listing page?

I have used register_taxonomy() with 'show_admin_column' => true successfully to get a drop-down on my custom post type listing page. The drop-down displays the terms in ID order by default. ...
0
votes
1answer
135 views

How to create taxonomy without using register_taxonomy () function

I am working on a plugin where I have to create taxonomy. But due to my requirement with little bit complexity, I have to create taxonomy without register_taxonomy(). Can somebody give me hints ...
0
votes
0answers
34 views

Taxonomy Terms That Don't Exist Display Results

I am working on a custom post type with an archive at: https://www.bowlertransmissions.com/mmc/ If you click one of the results years, such as '2016' you will then get to a page with two buttons to ...
1
vote
2answers
2k views

Possible to register multiple custom taxonomies in one function?

I'm registering 7 custom taxonomies in my functions.php. Since each function uses the same labels and arguments and is attached to the same Custom Post Type, I'm wondering if it's possible to register ...
0
votes
1answer
2k views

Custom taxonomies not showing up in admin menu

I have defined a few custom taxonomies in my functions.php using the following code: <?php add_action( 'init', function() { $labels = array( 'name' => _x( 'Resource ...
23
votes
3answers
16k views

Can multiple custom post types share a custom taxonomy?

I'm considering rebuilding a drupal site in wordpress and am still wrapping my head around the differences between the systems - particularly cck/fields and custom content types and the different ways ...
1
vote
0answers
149 views

Custom Taxonomy isn't working from frontend post submitting

hi, i am working on a video sharing site project! I have Created a Template file where people can submit their post as video! Everything was working very good, but the custom Taxonomy ponstars isn't ...
-1
votes
1answer
308 views

Custom register_taxonomy ins't showing custom Nav menu

i am using wordpress custom post and register_taxonomy bellow is my code . function epg_works_register() { $labels = array( 'name' => __('Works'), 'singular_name' => __('Works'), ...
0
votes
0answers
105 views

set_object_terms for custom taxonomy in custom post type - not working

All I want is to set a custom posts taxonomy. Here is the taxonomy "lostitem" I registered for the custom post type "verloren" function create_taxonomies(){ $labels = array( 'name' => _x('Lost ...
1
vote
1answer
33 views

Remove url rewrites for registered taxonomies

According to this having many url rewrites doesn't slow down website. But neverthless is it possible to disable generating those rewrites when I register taxonomies? Becase only for this one CTP I ...
0
votes
1answer
281 views

Custom Taxonomy index/archive hierarchy

I have built a custom taxonomy, say, cars. The URL looks like this: http://www.example.com/cars/elantra/ and this is working fine by using the file taxonomy-cars.php as the template. Now, I would ...
0
votes
1answer
605 views

Adding predefined terms to a taxonomy

I'm writing a plugin for adding a Custom Post called"Dog". The core of the plugin is strictly based on this one https://github.com/RescueThemes/Rescue-Animal-Custom-Posts I prefer to add predefined ...
1
vote
0answers
32 views

taxonomy tax-name archive

I am creating a taxonomy $labels = array( 'name' => $name->labels->name, //genre 'singular_name' => $name->labels->singular_name, //genre ...
1
vote
2answers
2k views

How can I fix those issues generated by the Themecheck plugin

I've got the following error messages on the themecheck plugin in my WordPress theme. REQUIRED: The theme uses the register_taxonomy() function, which is plugin-territory functionality. ...
0
votes
1answer
250 views

Templates files for custom post type with custom tags

There is a task: Create a new post type (video) with its own post tags and tag page - separate from normal post. What I've done: // Create a new post type register_post_type('video', array('...
1
vote
1answer
292 views

Insert terms for custom taxonomy on plugin activation, or each page load (init hook)

Consider a plugin which adds a custom Taxonomy and then fills the taxonomy with a large term hierarchy (tens of hierarchical terms, may become hundreds in specific installations). I understand that ...
1
vote
1answer
610 views

update_count_callback argument in register_taxonomy function not working

I registered a custom taxonomy for ATTACHMENTS. Everything is fine on the admin side : I can tag medias with my custom taxonomy's categories, they show up with my images, etc. I then build a template ...
0
votes
1answer
79 views

Separating a custom taxonomy from blog post-type

Whenever I invoke register_taxonomy in my site's custom plugin, all taxonomies are created as children of the blog post-type in WordPress by default. I just want them to be top-level items in ...
2
votes
1answer
381 views

Use register_taxonomy() in register_activation_hook()

I would like to use register_taxonomy() to define a hierarchy of geographical terms. It seems that the natural place to place it would be in a function called by register_activation_hook() seeing how ...
1
vote
0answers
157 views

Combine multiple custom user taxonomy in single url

I have created custom user taxonomy for user and its working good. Reference guide:- http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress Bellow is structure of taxonomy ...
0
votes
0answers
130 views

Sort Taxonomy List by Custom Values

I'm trying to make the order of taxonomies adjustable. I've already got the drag & drop working and can put those values to the database. I just don't know how to sort the taxonomy list by other ...
0
votes
0answers
409 views

add_action priority and taxonomy used in plugin

I try to register my taxonomy in my plugin and use it after. So far I have done: function custom_taxonomy() { $labels = array( ... ); $args = array( ... ); ...
1
vote
1answer
302 views

previous_post_link/next_post_link disappear when excluding by post_format

I am trying to exclude aside post formats from my next and previous links, but for some reason, using get_term_by is not returning me the term_id for the post_format taxonomy. I see this taxonomy ...
2
votes
1answer
3k views

What does query_var do in register_taxonomy

What happens if in register_taxonomy( $taxonomy, $object_type, $args ) I set query_var arguement to true? I read here this query_var (boolean or string) (optional) False to disable the ...
0
votes
1answer
1k views

Proper way to update the slug of a taxonomy using register_taxonomy? [duplicate]

What is the best way to update the slug of a custom taxonomy that is registered by a plugin? I want to know the minimal amount of parameters for this or if i need to go and copy paste all of the ...
1
vote
1answer
935 views

Change existing taxonomy settings when using custom taxonomy

For a plugin I have created a new custom taxonomy for attachments using the function register_taxonomy() and parameters like "show_admin_column". When this parameter is set to true, it shows the ...
1
vote
1answer
4k views

get_terms from registered taxonomies not working

In functions.php I can var_dump() taxonomies like: $taxonomies=get_taxonomies('','names'); echo '<pre>'; var_dump($taxonomies); which give me: array(7) { ["category"]=> string(8) "...
2
votes
1answer
92 views

Post taxonomy from exif data

Whenever I post a post with a featured image, I want to extract the exif data from that image and attach it as a term for a taxonomy. I already got a plugin which can extract the relevant info, but I ...
0
votes
2answers
979 views

Register custom taxonomy from a Advenced custom field option page

I have a website with products (shoes), i have some shoes models registered as taxonomy on the function.php file like so: function add_custom_taxonomies() { register_taxonomy('mod-nike', '...