Get current term in single.php

You can use wp_get_object_terms($object_ids, $taxonomies, $args) to get all terms from a defined set of taxonomies for an object The $taxonomies parameter can be an array of taxonomy names. http://codex.wordpress.org/Function_Reference/wp_get_object_terms

How to Order a list of taxonomies? orderby?

If you use the more generic get_terms you can include in the $args field all of the information to get the term or the children and specifically say what you want to order by and how you want it to be ordered. Ex. $termchildren = get_terms( “location”, array( ‘child_of’ => 4, ‘orderby’ => ‘name’, ‘order’ … Read more

Querying posts by latitude and longitude to build a Google Maps with several markers

To connect your meta fields with the “Geo Data Store”-Plugin, you simply take the name of the meta key/field and map it with the filter to the plugin. add_filter( ‘sc_geodatastore_meta_keys’, ‘wpse82502_lat_lng_metakey_mapping’ ); function wpse82502_lat_lng_metakey_mapping( $keys ) { $keys[] = “your_meta_key_field_name”; return $keys; } To get the data from PHP to JS, simply use wp_localize_script().

Return Taxonomy Name for Each Term

$term->taxonomy is the taxonomy name for each term, $term->term_taxonomy_id the – wait for it! – taxonomy ID. To get the display names use get_taxonomy(): $terms = get_terms( array( ‘category’, ‘post_tag’ ) ); foreach ( $terms as $term ) { $tax_name = esc_html( get_taxonomy( $term->taxonomy )->labels->name ); echo “$term->name ($tax_name)<br>”; }

array_replace throwing php_warning but working anyway

$term_object->order tells you $term_object is an object. array_replace() expects an array, not an object. Not sure why it works, maybe PHP is casting the object to an array. array_replace( $term_objects, (array) $term_object ); … could fix the warning.