taxonomy

How to get taxonomic specific ids for kingdom, phylum, class, order, family, genus and species from taxid?

情到浓时终转凉″ 提交于 2019-12-05 21:46:42
问题 I have a list of taxids that looks like this: 1204725 2162 1300163 420247 I am looking to get a file with taxonomic ids in order from the taxids above: kingdom_id phylum_id class_id order_id family_id genus_id species_id I am using the package "ete3". I use the tool ete-ncbiquery that tells you the lineage from the ids above. (I run it from my linux laptop with the command below) ete3 ncbiquery --search 1204725 2162 13000163 420247 --info The result looks like this: # Taxid Sci.Name Rank

Add custom fields in custom taxonomy meta box in wordpress-3.5.2

末鹿安然 提交于 2019-12-04 17:39:36
Unable to add custom fields in custom taxonomy meta box in wordpress-3.5.2. I have checked solution in various blogs but Unable to solved this problem. I am using wordpress-3.5.2 What I am trying is :- // A callback function to add a custom field to our "adtag" taxonomy add_action( 'adtag_edit_form_fields', 'adtag_callback_function', 10, 2); // A callback function to save our extra taxonomy field(s) add_action( 'edited_adtag', 'save_taxonomy_custom_fields', 10, 2 ); I have tried solution from below link:- http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/

Wordpress: How can I exclude posts in child taxonomies from a custom taxonomy query?

≡放荡痞女 提交于 2019-12-04 17:23:44
My WordPress theme has a custom taxonomy called "Collections". The custom taxonomy is hierarchical, so there are subcollections. I have a Collection called "Books" and a sub-collection called "Novels". There are some posts that are just in "Books", and some posts that are in "Novels". I want the page for the "Books" collection to only show posts in the main "Books" collection, not the ones in the "Novels" subcollection. But by default, WordPress includes posts in "subcollections" in the query for a taxonomy. How do I exclude posts in child terms from my taxonomy query? This is easy with

Drupal 7: Pathauto hierarchical taxonomy terms pattern

我怕爱的太早我们不能终老 提交于 2019-12-04 11:30:34
I have a Drupal 7.9 taxonomy vocabulary according to the following scheme: category-1 category-1 > subcategory-1-1 category-1 > subcategory-1-2 category-1 > subcategory-1-3 category-2 category-2 > subcategory-2-1 I want to reflect this taxonomy hierarchy in my page url path like category-1/subcategory-1-1/page-123 To achieve this I'm using the modul Pathauto version 7.x-1.0. but I don't know which pattern I have to use. Currently I'm using [node:%field_taxonomy%]/[node:title] but with this pattern the url path is just subcategory-1-1/page-123 , so the complete hierarchy isn't reflected. Is

Wordpress - Custom taxonomy page of custom post type listing by terms

五迷三道 提交于 2019-12-04 03:56:34
I have a taxonomy-taxonomy.php page that needs to look like so: CUSTOM POST TYPE TITLE (RESOURCES) Custom Taxonomy 1 (Resource Types) Resource Type Term 1 (White Papers) White Paper post 1 White Paper post 2 White Paper post 3 Resource Type Term 2 (Videos) Videos post 1 Videos post 2 Videos post 3 Tried to make sense of all the new documentation for Wordpress 3.0, but it only made me more confused as it seems to be mixed up with 2.8. It's not necessary to transform the object to an array, you can perfectly work with the object without too much hassle. What is curious (at least for me), is that

Creating Drupal taxonomy terms from code?

半腔热情 提交于 2019-12-04 02:17:47
问题 What is the function used to create taxonomy terms in Drupal from the code? 回答1: Why don't check the API docs? The answer is right there. http://api.drupal.org/api/function/taxonomy_save_term/6 回答2: A module I was writing needed a specific vocabulary with hierarchical terms. I wrote this function to save the terms: <?php /** * Save recursive array of terms for a vocabulary. * * Example: * <code><?php * $terms = array( * 'Species' => array( * 'Dog', * 'Cat', * 'Bird' ), * 'Sex' => array( *

Creating Taxonomy Table in MySQL

对着背影说爱祢 提交于 2019-12-03 12:40:45
问题 I am creating a botanical database where the plants will be organized by their taxonomy: Life Domain Kingdom Phylum Class Order Family Genus Species I was considering using the example put forth by the article Managing Hierarchical Data in MySQL, however it is adding the above list as records inside the table....and I'm not sure if that is the best thing to do since I will be having multiple species per genus and multiple genus per family and so on. What would you suggest is the best way to

How do I remove a taxonomy from Wordpress?

不打扰是莪最后的温柔 提交于 2019-12-03 05:39:14
问题 I'm creating different custom post types and taxonomies and I want to remove the 'Post Tags' taxonomy from the default 'Posts' post type. How do I go about doing this? Thanks. 回答1: I suggest you don't mess with the actual global. Its safer to simply deregister the taxonomy from the post type: register_taxonomy is used for both creation and modification. function ev_unregister_taxonomy(){ register_taxonomy('post_tag', array()); } add_action('init', 'ev_unregister_taxonomy'); To remove the

Creating Taxonomy Table in MySQL

断了今生、忘了曾经 提交于 2019-12-03 03:07:14
I am creating a botanical database where the plants will be organized by their taxonomy: Life Domain Kingdom Phylum Class Order Family Genus Species I was considering using the example put forth by the article Managing Hierarchical Data in MySQL , however it is adding the above list as records inside the table....and I'm not sure if that is the best thing to do since I will be having multiple species per genus and multiple genus per family and so on. What would you suggest is the best way to approach this problem. Thanks in advance. Ante I worked with similar data, and I made it in 2 parts. In

Display current post custom taxonomy in WordPress

若如初见. 提交于 2019-12-02 19:45:38
I've created custom taxonomies on WordPress and I want to display the current post taxonomies on the post in a list. I'm using the following code to display a custom taxonomy named "Job Discipline": <ul> <?php $args = array('taxonomy' => 'job_discipline'); ?> <?php $tax_menu_items = get_categories( $args ); foreach ( $tax_menu_items as $tax_menu_item ):?> <li> Job Discipline: <a href="<?php echo get_term_link($tax_menu_item,$tax_menu_item->taxonomy); ?>"> <?php echo $tax_menu_item->name; ?> </a> </li> <?php endforeach; ?> </ul> That's just one of many taxonomies I want to list. The problem is