Regards,
Ben
I have a page for media where they should download high-res images. Problem: everything is now in avif and no one can use this format. is it possible to exclude images or whole pages?
]]>However, what if I want to exclude by a category. The question posed in the above post suggested using a minus in front of the ID, i.e. es_label=”-121″, however when I try this it simply includes label 121 ignoring the minus sign.
Is there a way to achieve this?
Scenario is, client wants to exclude properties with a certain label from their ‘all properties’ listing and include these separately elsewhere. I can handle the elsewhere using the above to only include by label X, but can’t do so using exclude on the all properties search shortcode.
]]>I have difficulties to exclude an inline JS varable to be cached since it comes php.
window.Yco.countryCode = '<?php echo $_SERVER['GEOIP_COUNTRY_CODE'] ?? ''; ?>';
I placed the string based exludes to all boxes https://prnt.sc/3IO4iRzgpCNI even added this to the inline script data-no-optimize="1" data-no-defer="1"
, but I have no luck whit it. If I disable the plugin, then it works.
What do I do wrong?
Thank you!
]]>The shortcode [connections category_in=’18’] doesn’t work (the entire directory still shows). I have therefore excluded everything I don’t want (a bit tedious and also means I have to remember if I add another category!).
Am I doing something wrong, please?
]]>Can you provide a code snippet, filter, etc. that will allow us to exclude a page (or pages) from CSS or JS combination or JS Defer? It would be great if you can add that as a feature to your plugin as well (as other do).
Example: https://prnt.sc/mZZozWp4WZhs
Thank you!
]]>How can I exclude all of the files in wp-content/uploads folder? Please let me know.
Thanks.
]]>We are using your plugin Advance Woo Search which works fine. We are having one issue and that is we want to remove specific product category products from search when a user is logged in to the website. A kind of restricted product search for logged in customers. I am using this article to hide specific products of a category. It works partially and there is an issue I have to give all combinations of search terms to prevent the product from appearing in the search which is very frustrating. Is there an easy way of doing it. Here is my code, the problem is to hide one product Freya I have to give 3 combination for search terms one is Fre, Frey and Freya. Is there a better way of doing it. We have large number of products which we are looking to hide of a product category. The best solution would to simply exclude the products of a specific taxonomy which is not based on user search terms.
function aws_custom_search_terms($terms) {
// Store the terms in a global variable
global $aws_search_terms;
$aws_search_terms = $terms;
return $terms;
}
add_filter('aws_search_terms', 'aws_custom_search_terms');
function aws_custom_search_query_array($query) {
// Use the global variable to get the terms
global $aws_search_terms;
$exclude_array = array(
'fre' => array(1922),
'frey' => array(1922),
'freya' => array(1922),
);
$exclude_ids_array = array();
if ($aws_search_terms) {
foreach ($exclude_array as $term => $ids) {
$term_arr = explode(' ', $term);
$exclude = false;
if ($term_arr && count($term_arr) === count($aws_search_terms)) {
foreach ($term_arr as $term_i) {
if (array_search($term_i, $aws_search_terms) !== false) {
$exclude = true;
} else {
$exclude = false;
}
}
}
if ($exclude) {
$exclude_ids_array = array_merge($exclude_ids_array, $ids);
}
}
}
if (!empty($exclude_ids_array)) {
global $wpdb;
$taxonomies = implode(',', $exclude_ids_array);
$query['exclude_products'] = " AND ( id NOT IN (
SELECT $wpdb->posts.ID
FROM $wpdb->term_relationships
JOIN $wpdb->posts
ON ( $wpdb->term_relationships.object_id = $wpdb->posts.post_parent OR $wpdb->term_relationships.object_id = $wpdb->posts.ID )
WHERE $wpdb->term_relationships.term_taxonomy_id IN (
SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id IN ({$taxonomies})
)
))";
}
return $query;
}
add_filter('aws_search_query_array', 'aws_custom_search_query_array');
Does the premium version of the plugin support the option of excluding products of a specific category only for logged in customers not for all of them?. Looking forward to your response.
]]>