Hello,
I have a client who wants to hide their product category sidebar when you are on an EZ Page (I know, I know...). lIs this possible? If so, how?
Thanks!
Hello,
I have a client who wants to hide their product category sidebar when you are on an EZ Page (I know, I know...). lIs this possible? If so, how?
Thanks!
The whole sidebar, or just the categories sidebox?
It can be done with CSS (quick & dirty) or by a small edit in a PHP file (which file depends on exactly what you want to do).
I am also working on a client's site, and need to hide specific categories on specific EZ Pages. What is the best way to do it? I saw some discussion about creating a CSS file; would appreciate any help on the best way to accomplish it. Thank you!
Irina
Quick & dirty: Add to your stylesheet
#pageBody #categories {display: none;}
Proper way: Edit /includes/modules/sideboxes/categories.php; at the top of the file, add
if ($current_page_base != 'page') {
before
$main_category_tree = new category_tree;
and after
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
add
}
Save the edited file to /includes/modules/sideboxes/your_template/categories.php
This works great for hiding ALL categories on an EZ page.Quick & dirty: Add to your stylesheet
#pageBody #categories {display: none;}
What if I needed to hide several, but not all, categories on a page? Not sure of the best way of doing it (client's choice, BTW).
Would greatly appreciate any ideas on how to go about it. I'm quite stuck here
You mean just some of the category links in your categories sidebox? The only way beside new custom coding would be to install Categories Dressing, configure it so that the desired categories were in "groups" (see the readme), and add a rule to your stylesheet like
#pageBody #catGroup23, #pageBody #catGroup47, #pageBody #catGroup69 {display: none;}
Yes, that's what I am talking about. Since I can't write my own custom coding, I'll try your second suggestion. I'll be back Thank you so much for great advice--always!
Irina
Exactly how did you copy the code into your file? As written here, it will only show the sidebox if $current_page_base is NOT 'page'.
Bookmarks