How to randomise a custom taxonomy tag cloud
Valid orderby fields for wp_tag_cloud are name or count.
Valid orderby fields for wp_tag_cloud are name or count.
Have you checked the WordPress Template Hierarchy Diagram To get an idea how wordpress choose the tempalte. I’m not sure but according to the WordPress Template Hierarchy, WordPress will choose default archive.php for custom taxonomy if no special template is specified. That means you cannot not have archive-product.php to use with Custom Taxonomy archive. In … Read more
As per le comment. function remove_artist_meta() { remove_meta_box( ‘{taxonomy name}’, ‘post’, ‘side’ ); } add_action( ‘admin_menu’ , ‘remove_artist_meta’ ); The Admin menu has been always difficult to deal with, some help here would be nice: http://core.trac.wordpress.org/ticket/12718 But I think that this could be added a a parameter to register_taxonomy. http://core.trac.wordpress.org/ticket/21543
ok, i don’t know how this looks but i’ve got exactly what i wanted. <?php $term = get_queried_object(); $tax = ‘ntp_package_type’; $parents = $term->parent; $term_id = $term->term_id; if($parents == 0 && !is_single()){ wp_list_categories( array ( ‘taxonomy’ => ‘ntp_package_type’, ‘pad_counts’=> 0, ‘title_li’ => ”, ‘child_of’ => $term_id, ) ); } elseif ($parents > 0 && is_tax($tax, … Read more
It’s not necessarily a fix, but you should be able to use the Rewrite Analyzer plugin to help you understand how WP is rewriting your links.
It can be daunting to wrap your head around these things sometimes. I sure had a hard time with it 🙂 You were right making the Restaurant a custom post type which you can then assign terms from your the custom taxonomies. First of all, it would be best if you change the names of … Read more
If the code above is how it is in your actual theme file, there are obvious errors (maybe it didn’t post right here). Here is the fixed code: <?php add_filter(‘post_type_link’, ‘my_permalink_structure’, 10, 4); function my_permalink_structure($post_link, $post, $leavename, $sample) { if ( false !== strpos( $post_link, ‘%states%’ ) ) { $term = get_the_terms( $post->ID, ‘states’ ); … Read more
I was able to solve this by ordering my taxonomy values based on this post: Custom taxonomy, get_the_terms, listing in order of parent > child
The is_tax() function checks if a custom taxonomy archive page is being displayed. So it will only work in template files such as taxonomy-product_cat.php – unless you create new templates for specific categories in the product_cat taxonomy. For example, if you have a product category called “Toasters” and the slug is “toasters” then the template … Read more
Use a taxonomy.php template?! taxonomy.php <?php get_header(); ?> <?php $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); ?> <h1><?php echo $term->name; ?></h1> <?php global $query_string; query_posts( $query_string . ‘&orderby=title&order=asc’ ); if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <h1><a href=”https://wordpress.stackexchange.com/questions/72934/<?php echo get_permalink(); ?>” title=”<?php the_title(); ?>” rel=”bookmark”><?php the_title(); ?></a></h1> <?php … Read more