Hi
Plugin doesnt seem t work.
Any chance of an update in the near future?
regards
]]>The first fresh installation of this plugin didn’t work for me. I created a specific category to be hidden anywhere and assigned this category to one post (just for testing), but nothing happened: the post was anywhere, like it was before using the plugin.
As my WordPress version is 4.0 I thought it could be some compatibility problem, and I digged into the code.
I have finally got a working implementation with two small changes (I have not checked if they are both required or it is just the first one… anyway, now it works). The main problem was with getting the category_hide option: the code was using explode as if categories would be a comma-separated list of categories, but they where actually an array. I just got rid of explode.
The function I changed is wp_hide_category, which is located in the wp_hide_category.php plugin file. The following code shows my modified version of the function (changes are indicated with comments):
function wp_hide_category($query) {
if(!is_admin() /* && $query->is_main_query() */ ) {
$wp_hide_category_hide_place = get_option('wp_hide_category_hide_place');
// Modified from original: $category_hide = explode(',', get_option('wp_hide_category_id'));
$category_hide = get_option('wp_hide_category_id');
if(!empty( $wp_hide_category_hide_place)) {
foreach($wp_hide_category_hide_place as $template_name){
$call_name = 'is_' . $template_name;
if($query->$call_name()){
if(!empty($category_hide)) {
foreach($category_hide as $cat_id) {
// Modified from original: $query->set('cat', '-' . $cat_id);
$query->set('category__not_in', $cat_id);
}
}
}
}
}
}
}
Hope this helps.
]]>Warning: explode() expects parameter 2 to be string, array given in …/html/wp-content/plugins/wp-hide-category/wp-hide-category.php on line 56
plz, fix it.
]]>Hi,
I have implemented the plugin and it doesn’t exclude the categories in this blog: https://www.screencast.com/t/gLoh6bD6
I have excluded all pages and all categories – well, I only have uncategorised
Thank you
liz
]]>Warning: explode() expects parameter 2 to be string, array given in /nfs/c10/h04/mnt/151575/domains/stg.parkplacewines.com/html/wp-content/plugins/wp-hide-category/wp-hide-category.php on line 56
]]>I activated the plugin and entered “Uncategorized” without the quotes in the “The Category ID you want to hide” field yet the “Uncategorized” field still shows up on my blog, which is https://www.davidlyell.net. Please advise. Thanks.
]]>I’m receiving this error and not sure why. I only have 3 posts and they are all in Uncategorized category. I am entering Uncategorized into the category field in the plugin and I keep receiving this error.
Please advise
Thanks
Andy
When both: “WP Hide Category” and “Archive Posts Sort Customize”
https://www.ads-software.com/plugins/archive-posts-sort-customize/
are active, “Archive Posts Sort Customize” does not work. Can you fix this?