scaleability of tags

First of all, WordPress.com is not the same as self-hosted WordPress, anything there can be assumed not relevant to a self-hosted install for one reason or another. Obviously the hardware you have will impact its ability to scale, I’m sure you could find hosting that didn’t provide the memory to even get through the install … Read more

Show button only for certain Woocommerce Product Categories

You are trying to echo PHP code. Additionally you are using single and double quotes wrong. You should just fix the formatting of your echo() functions. Something like this: echo ‘<div id=”requestsample”><a class=”fancybox button” href=”#contact_form_pop”>Request a Sample</a><div class=”fancybox-hidden” style=”display: none;”><div class=”hentry” id=”contact_form_pop” style=”width: 600px; height: 500px; overflow-x: hidden”>’; echo do_shortcode( ‘[contact-form-7 id=”269″ title=”Request Sample”]’ ); … Read more

How to allow Category Title to use tags?

I am not sure if you can force the system to accept markup in the category titles, and I am not sure you should even try so I am going to suggest that you hack together a kind of markdown. Use some character like * as a placeholder then… add_filter( ‘the_category’, function($categories) { $pattern = … Read more

add slug beside name in Admin Category Checklists

ok since i didn’t have any response im posting the SOLUTION my self so it can be useful for others wanting to do the same: add_filter(‘wp_terms_checklist_args’, ‘display_custom_checklist’); function display_custom_checklist( $args ){ if ( $args[‘taxonomy’] == ‘portfolio-type’ ) $args[‘walker’] = new my_custom_walk; return $args; } class my_custom_walk extends Walker { var $tree_type=”category”; var $db_fields = array … Read more

Get a count of how many times a term or a category is used in posts

Wp_Query should be able to do this for you. Pass it the appropriate parameters, including a tax_query, and check found_posts. $p = new WP_Query( array( ‘post_type’ => ‘custcpt’, // your CPT ‘tax_query’ => array( array( ‘taxonomy’ => ‘custtax’, // your tax ‘field’ => ‘id’, ‘terms’ => $cat->term_id, // your term ID ) ), ‘ignore_stickie_posts’ => … Read more

how to remove the default title of Categories widget

There is a filter you can use to do this. (Kruti has even found it, but instead of using it, he modified core files…) $title = apply_filters(‘widget_title’, empty( $instance[‘title’] ) ? __( ‘Categories’ ) : $instance[‘title’], $instance, $this->id_base); So what you really need to do, is to add this to your functions.php: function my_repair_categories_empty_title($title, $instance, … Read more

get_posts ignoring ‘category’ and displaying all posts

Ok. After a frustrating weekend I have a workaround (but still not real reason why the simpler version worked on one install and not another!) $args = array( ‘posts_per_page’ => $pageSize, ‘offset’=> $offset, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘term_id’, ‘terms’ => 9 ) ); While this is a totally workable solution, … Read more