miketopher
Member
Posted 11 months ago #
Can anyone tell me how to remove a product category from the shop/shop home page in WooCommerce
Iv already tried
https://gist.github.com/1705012
and it worked, but since the latest wp and woo updates this no longer works.
I also wrapped in the if is_admin thing, again it worked, but not since update
http://wordpress.org/extend/plugins/woocommerce/
Try tweaking the hook
add_filter( 'pre_get_posts', 'custom_parse_query', 20 );
function custom_parse_query( $q ) {
if ( $q->is_main_query() ) {
// Query here
}
}
miketopher
Member
Posted 11 months ago #
i replaces what you provided, it broke :(
i played around with it myself changing the is_ statement around but to no avail.. what ever it needs to be changed to im not good enough to figure it out
My mistake, add_filter should be add_action
miketopher
Member
Posted 11 months ago #
i still get
Parse error: syntax error, unexpected $end in /home/site/domains/site.com/wp-content/themes/eyetheme/functions.php on line 71