In my wordpress theme I created a new custom post type ‘books’ with 2 taxonomies (‘series’, ‘genres’). when I visit the archive of the cpt ‘books’ (site.com/books), I list all the books.
I added a custom frontend filter to get in this archive page books by taxonomy terms by passing an argument to the url with the name of the taxonomy and the terme (like this: site.com/books/?genres=action). Like a book browser.
But wordpress is by default creating the link for my taxonomies like this (site.com/genres/action/) and i want it to be "redirected" to the books post type with the taxonomy argument (site.com/books/?genres=action).
Is it possible to achieve that ? Thank you
I have a custom post type with multiple custom taxonomies. I need those taxonomies to have a relationship as well. The trick is, I need a child to be able to have multiple parents. I understand that the current db structure for WordPress doesn’t allow for this, but I was curious if anyone has dealt with this and had an elegant solution.
I’ll update if I figure it out first.
Trying to figure out the best way to do this. Hope I can get some help. So I am developing a plugin which handles a custom post type of cars. I am looking to add. A couple of category taxonomies related to the CPT ie Model and Make. I have been able to successfully add the model taxonomy like so:
//model taxonomy options $ model_labels = array( 'name' => _x( 'Models', 'taxonomy general name' ), 'singular_name' => _x( 'Model', 'taxonomy singular name' ), 'search_items' => __( 'Search Models' ), 'all_items' => __( 'All Models' ), 'parent_item' => __( 'Parent Model' ), 'parent_item_colon' => __( 'Parent Model:' ), 'edit_item' => __( 'Edit Model' ), 'update_item' => __( 'Update Model' ), 'add_new_item' => __( 'Add New Model' ), 'new_item_name' => __( 'New Model Name' ), 'menu_name' => __( 'Models' ), 'back_to_items' => __( '? Back to models' ), ); // Now register the taxonomy register_taxonomy('models','car', array( 'hierarchical' => true, 'labels' => $ model_labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'model' ), ));
Now the question is how do I go about registering a separate “make” taxonomy as the parent of the “model” taxonomy? Is that possible with WordPress? Ie having a “category > subcategory > post” setup? Hope that makes sense.
I have a question about taxonomies.
Do they exist at only the site collection level? Or can you specify unique taxonomies at the sub-site level as well?
By default tagdiv newspaper theme not support filter by custom post or custom taxonomies in ajax filter in blocks.
Any help please?
Well, I need th display names of taxonomies that used by post of special taxonomy . for example I have a taxonomy for restaurants and in that taxonomy I have two parent : City and Country , so I have some taxonomy page for countries that display the restaurants of that country and name of cities that have some posts for show and I don’t want to show name of cities that don’t have any posts on country page. I hope my description was clear.
Tengo un sitio de películas al que le estoy por agregar series. Para ello creé el custom post type “capitulo” donde voy subiendo los capítulos y les asigno una “serie” (custom taxonomy). Todo muy lindo y funcionando bien. Dentro de “serie” (custom taxonomy) tengo por ejemplo “Game Of Thrones” como taxonomía padre y “Temporada 1” como taxonomía hija de “Game of Thrones” Ahora quiero crear dos plantillas para mostrar por un lado los post asignados a las taxonomías padres de serie (custom taxonomy) y otra plantilla para mostrar luego los posts asignados a las taxonomías hijas.
Esto lo hago para luego armar el listado de capítulos según la temporada.
Trate de ser lo mas detallado posible, muchas gracias.
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 is picked, I want to get all the children, but only the children that are linked to a product.
Is this possible?
Currently I’m just getting the immediate children of the first term picked, I don’t know how to filter out the ones that have no matches.
This is the second request:
$ terms = get_terms( 'tyre', array( 'orderby' => 'name', 'child_of' => $ term_id, 'hide_empty' => $ hide_empty ));
Is there a way to extend this to something like this:
$ terms = get_terms( 'tyre', array( 'orderby' => 'name', 'category' => 'tyres', 'only_linked_to_products' => true, 'child_of' => $ term_id, 'hide_empty' => $ hide_empty ));
Obviously I’ve just invented these two properties, but it would help illustrate what I’m trying to do
I created extra field in Login Form, I Installed even Extra Module (address) and create Taxonomies
Now I want to Export these configurations to another Drupal. This Drupal is the Clone of the main Drupal.
I Tried to use import/export Configuration (admin/config/development) But I have several error during import ( shortcut and error Ajax 500 )
I don’t have active and staging folder (link)
Is it correct to use Conguration Management to export Module and Taxonomies?
I am having a link field in drupal 8. It can accept both internal and external links with autocomplete feature. But it works only with nodes means with content but i want to use it with taxonomy terms as well.
How can i achieve this ? Any Help