Reputation:
I'm looking for a way to hide a "form" drop down menu in WooCommerce but only on a specific category page. We'll call it "marbles", the drop down to select the ordering of items I would like to not appear, but on the category "apples" and other pages I would like for it to remain visible. I've tried using code similar to #category-id-15 form.woocommerce-ordering {display: none;}
but that didn't seem to do the trick. Can this be done using CSS only or would I need to create an action for it?
Here's the page I'm trying to hide the drop down menu on -
CATEGORY PAGE
Upvotes: 1
Views: 514
Reputation: 5067
You can hide it using CSS. But Wordpress offers a function is_category()
to do such operations .
In your category.php file, try using this:
if (!(is_category('marbles'))){
include(TEMPLATEPATH.'/part.php');
}
where part.php
is the php code where you have your drop down menu.
I am here to provide with more support.
Upvotes: 0