How can i hide the authors box from a specific set of categories and post types?

This depends on your theme. If it has no option for this, you’ll have to do this yourself. Find the template where the author box is generated (presumably single.php) and copy it to a child theme. Then make the production of the box conditional to the current category; if (!is_category (array (‘exclude-this-category, another-category-to-exclude’)) { echo … Read more

Country Ways Content Show

This is actually quite easy to do: You will need to install a geolacation plugin that provides methods/functions to identify visitor country. N.B. A plugin only providing shortcodes will not work. The only complicating factor is countries can be named in a variety of ways so 2 character ISO Country Codes have to be used … Read more

Help Me “in_category” with echo? [closed]

If you are using in_category correctly, your code modified as per my comment should work. That is… if (in_category($ct_portfoliocatid)) : include (TEMPLATEPATH . ‘/portfolio.php’); else : endif; You don’t need all those messy opening and closing PHP tags so I removed them and I don’t know why you have an else at all. From the … Read more

Narrow Down a Shop Page Results Based on a Product Tag in WooCommerce

I passed query strings to the URL of the category page to display the tags within that category. This is what I did to solve the same problem function displayLocationDropdown() { if(!is_product_tag()){ $html=””; $html .= ‘<form class=”location-select” method=”post”>’; $html .= ‘<select id=”location-selector” name=”location” class=”location”>’; $tag = wp_tag_cloud( array( ‘format’ => ‘array’, ‘taxonomy’ => ‘product_tag’ ) … Read more

how to ask if in two categorys inside if

You can specify multiple categories within has_category like so: if ( has_category( array( ‘category_1’, ‘category_2’ ) ) { // do something } However, I am not sure if this acts as AND or OR, meaning does it require that ALL categories specified are matched, or one of the X supplied (category_1 OR category_2). In any … Read more

Only show sub-category

You can make use of the get_the_categories filter to remove the parent categories from the list. the_category() uses get_the_category_list() which in turn uses get_the_category() The idea is to check the categories returned against an array of parent ids and then removing those categories from the list. You can try the following (Requires PHP 5.3+) add_filter( … Read more