Exclude Categories from Navigation
Please! How can I exclude categories from Navigation menu please?
I am using the Typerite1.1 theme and Categories plugin with Enabled "Hide Categories without content" but does not working.
"Categories" label, appearing in my Sidebar menu without any categories content!
Thanks!
I am using the Typerite1.1 theme and Categories plugin with Enabled "Hide Categories without content" but does not working.
"Categories" label, appearing in my Sidebar menu without any categories content!
Thanks!
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
1) Categories are part of the theme. You do not need the plugin.
2) Delete categories that are not used at "Manage" > "Categories".
3) Or modify the template index.php in the directory /bl-themes/typerite-1.1 (line 108):
instead of
2) Delete categories that are not used at "Manage" > "Categories".
3) Or modify the template index.php in the directory /bl-themes/typerite-1.1 (line 108):
Code: Select all
<!-- Categories -->
<li class="has-children">
<a href="#0" title="">Categories</a>
<ul class="sub-menu">
<?php
foreach ($categories->db as $categoryKey=>$categoryFields):
$count = count($categoryFields['list']);
if ($count>0) {
?>
<li><a href="<?php echo DOMAIN_CATEGORIES.$categoryKey ?>"><?php echo $categoryFields['name'] ?></a></li>
<?php } endforeach ?>
</ul>
</li>
Code: Select all
<!-- Categories -->
<li class="has-children">
<a href="#0" title="">Categories</a>
<ul class="sub-menu">
<?php foreach ($categories->db as $categoryKey=>$categoryFields): ?>
<li><a href="<?php echo DOMAIN_CATEGORIES.$categoryKey ?>"><?php echo $categoryFields['name'] ?></a></li>
<?php endforeach ?>
</ul>
</li>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Thanks Edi!
I have replace the code in index.php and I have zero categories in the manage section,
but Categories still be there in the menu of Typerite 1.1 !!!
Take a look please:
https://infotec.gr/spyrou/
I have replace the code in index.php and I have zero categories in the manage section,
but Categories still be there in the menu of Typerite 1.1 !!!
Take a look please:
https://infotec.gr/spyrou/
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
This is the title of the section in the navigation sidebar.
If you do not use categories you can delete the code for categories from the template.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets