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

Not able to display category link and name [closed]

get_the_catgory() returns an array of category objects assigned to a post. You are trying to use the result as a string. If you have debugging enabled, you would have received an error regarding this. You either need to loop through the array and handle each category separately, or you can reference them directly, like get_the_category()[0] … Read more

Call function on a single page

Assuming your function runs generally, to limit it to a specific page use if( is_page( 2094 ) ) { add_filter(“sjb_job_location_filter_args”,”exclude_jobs_locations_uk”); } The location of the function definition doesn’t matter. P.S. Regarding excluding categories . . . yeah, we’d need to know a lot more about what’s going on with the called (plugin?) function

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)