Questions tagged [register-taxonomy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
20
votes
3answers
15k 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 ...
18
votes
1answer
14k 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 ...
5
votes
1answer
90 views

Registering custom taxonomy with unique name, a good practise?

Is it a good practise to register custom taxonomy with a unique name (the $taxonomy parameter), and then use the rewrite argument to set a custom slug? For example, I could create a taxonomy called ...
2
votes
1answer
369 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 ...
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 ...
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. ...
1
vote
2answers
5k views

How to register child taxonomies?

Should I register both parent and child as 'hierarchical' => true, if there's no grandchild? If "Movie" is the top level taxonomy, when I register a child, is it as simply as: 'parent_item' => ...
1
vote
2answers
831 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 ...
1
vote
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 ...
1
vote
1answer
428 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(); } ...
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) "...
1
vote
3answers
766 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, ...
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 ...
1
vote
1answer
277 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
850 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
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 ...
1
vote
1answer
1k views

is_taxonomy is deprecated. What's the alternative?

Now that is_taxonomy($taxonomy) function deprecated how do I know if a taxonomy exist? What's the alternative? On a second note, the codex for wp_insert_term() says that if the taxonomy does not ...
1
vote
1answer
37 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 ...
1
vote
0answers
144 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
vote
0answers
31 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
1answer
569 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 ...
1
vote
0answers
145 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 ...
1
vote
1answer
295 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 ...
1
vote
1answer
479 views

Pagination on Custom Tax Pages Removes Spaces from Query Vars

I've got a weird problem that's very similar to this one: Why does Wordpress Pagination Remove the Spaces from my GET Variable?. Except that mine isn't withn search results pages--it's with custom ...
0
votes
1answer
563 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 ...
0
votes
1answer
26 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 ...
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 ...
0
votes
1answer
750 views

What are these undocumented arguments for register_taxonomy?

The Wordpress codex has an example of the register_taxonomy() function at http://codex.wordpress.org/Taxonomies that shows arguments that are not documented in http://codex.wordpress.org/...
0
votes
1answer
21 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
1answer
209 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
36 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 ...
0
votes
1answer
30 views

How to get my register taxonomy

My taxonomy register_taxonomy( 'king_blog_category', 'king_blogs', array( "hierarchical" => true, "label" => "King ...
0
votes
2answers
121 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
1answer
128 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
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 ...
0
votes
1answer
2k views

Register Taxonomy - What is `query_var`?

The Codex doesn't really explain it very well, what is it used for and how do I use it exactly?
0
votes
1answer
52 views

Taxonomize taxonomy terms?

I want to register taxonomies that apply to taxonomy terms (in addition to posts). I believe this is possible because posts and terms are both WP objects. What steps are needed to achieve this? ...
0
votes
1answer
392 views

Need help with Custom Post Types and Taxonomies

I'm trying to get my head around CPT and Taxonomies. I've created a section on my WP site called Work and so I've got this in my functions.php file: add_action('init', 'work_register'); function ...
0
votes
0answers
15 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
0answers
48 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 ...
0
votes
0answers
168 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
460 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
79 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
0answers
33 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 ...
0
votes
0answers
96 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 ...
0
votes
1answer
275 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
216 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('...
0
votes
0answers
128 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
384 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( ... ); ...
0
votes
2answers
938 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', '...