WordPress multisite – is it possible to have different taxonomies for each site?

Sure, you can. Each site in multisite is completely independent, so you can have completely different CPTs, taxonomies and… everything. The problem is that if you register the CPT via a plugin, and you enable it in all sites (or network-activate it) and you use the same plugin to register taxonomies, you’ll have same taxonomies … Read more

How can I change the output display of my pagination?

I could see that you are trying to achieve the following output: <div class=”pagination”> <span>Page {current} of {total pages}</span> {links here} </div> And you attempted it like so: ‘before_page_number’ => ‘<div class=”pagination”><span>Page ‘. // wrapped for clarity $paged .’ of ‘ . $term->max_num_pages . ‘</span></div>’ But that will actually add the markup before each and … Read more

display posts of custom post type with custom taxonomy

I would use “get_the_terms” to get the terms related to the post instead of “get_terms”, here is a quick suggestion (not tested) $args=array( ‘post_type’=>’tour_package’, ‘post__not_in’ => array(get_the_ID()), ‘posts_per_page’=> 5, ‘caller_get_posts’=>1,//handle sticky post but not in first ); $categories = get_the_terms( get_the_ID(),’tour_category’ ); if ($categories) { $category_ids = array(); foreach($categories as $individual_category){ $category_ids[] = $individual_category->term_id; } … Read more

Custom Category Walker with Image, Fallback to Most Recent Post in Category Image

The solution to the problem is that the tax_query needs to be an array of arrays. Thank you Sally CJ for the comment above, which also reminded me to $query->request. Here’s the total Walker for anyone for whom it’s useful: class List_Category_Walker extends Walker_Category { function start_el( &$output, $category, $depth = 0, $args = array(), … Read more

Display Custom Taxonomy names

it looks like your get_terms() call is incorrect, the argument is not an array and you have a typo in taxonomy name (‘product_category’ instead of ‘product_categories’) it should be <?php $terms = get_terms( array( ‘taxonomy’=>’product_categories’, ‘hide_empty’=> false ) ); ?> If this will not help it would be best if you could let us know … Read more