Remove Tag Cloud Words from Custom Taxonomy
Here is how to remove the words: Seperate tags with commas and Choose from the most used tags Simply add to the labels the following: ‘choose_from_most_used’ => NULL, ‘separate_items_with_commas’ => NULL,
Here is how to remove the words: Seperate tags with commas and Choose from the most used tags Simply add to the labels the following: ‘choose_from_most_used’ => NULL, ‘separate_items_with_commas’ => NULL,
well i just got a solution like this >> <?php $taxonomyName = “com_category”; $parent_terms = get_terms($taxonomyName, array(‘parent’ => 0, ‘orderby’ => ‘slug’, ‘hide_empty’ => false)); foreach ($parent_terms as $pterm) { $terms = get_terms($taxonomyName, array(‘parent’ => $pterm->term_id, ‘orderby’ => ‘slug’, ‘hide_empty’ => false)); foreach ($terms as $term) { echo ‘<div class=”single_cat col-md-3″>’; echo ‘<h3>’.$pterm->name.'</h3>’; echo “<ul>”; … Read more
Simply use the term id to replace ” and the taxonomy name to replace get_query_var( ‘taxonomy’ ). echo term_description( $term_id, ‘your_custom_tax_name_here’ ); P.S. Have you ever heard about Codex?
You can get terms by posts with this functions. $term_list = wp_get_post_terms($post->ID, ‘my_taxonomy’, array(“fields” => “ids”)); And echo or use different with foreach(). This tip get terms with ID. You can get another properties. wp_get_post_terms() in codex. Get term by id and taxonomy => $term = get_term($term_id, ‘my_taxonomy’); Get term name by id => $term->name; … Read more
I’m sure you can find accordion code samples anywhere. It might be helpful to convert terms into a structure that is more conducive to nested elements. <?php // Get terms as nested array function get_nested_terms ($taxonomy, $array=array(), $args=array() ) { $args = wp_parse_args($args, array( ‘orderby’ => ‘count’, ‘parent’ => 0, ‘hide_empty’ => true )); $terms … Read more
The trouble with meta queries is they require an additional join per filter. Say you have a property site, and you’re searching by location, rooms and price. That’s three joins. If you were using taxonomies, just two (terms and term_taxonomy) – no matter how many filters. The other reason taxonomies tend to beat meta queries … Read more
get_page_templates already returns an array: Array ( [Sidebar] => sidebar.php [Category] => category.php [Page] => page.php ) If you need to swap keys and values you can use php’s array_flip.
Your taxonomy registration in your example is showing this: function insurance_all_category(){ $labels = array( ‘name’ =>_x( ‘Insurance all category’, ‘taxonomy general name’ ), ‘singular_name’ => _x( ‘Category’, ‘taxonomy singular name’ ), ‘search_items’ => __( ‘Search Category’ ), ‘all_items’ => __( ‘All Categories’ ), ‘parent_item’ => __( ‘Parent Category’ ), ‘parent_item_colon’ => __( ‘Parent Category:’ ), … Read more
You could try this plugin I wrote: https://github.com/interconnectit/custom-post-type-permalinks
Found an answer to my own question. Still not sure how to implement it myself, but a plugin does this perfectly.