Hi,
I am building a theme for my magento. And I have encountered an interesting issue, which I could not find a solution yet.
I have 3 categories which does not have a sub category and the problem is that when I visit the website in mobile, under the account tab it is showing the categories that does not have a sub category.
I started to check the code in sections.phtml, but could not find a way to remove them from there.
in the inspect element code I noticed that the code that I want to remove has an id "store.menu"
but could not find a way to remove it from the section.phtml. below is the code in section.phtml. I appreciate any help you can give so I can remove those categories from showing there.
<?php $storeName = $block->getThemeName() ? $block->getThemeName() : $block->getLogoAlt();?>
<div class="menuContent" id="menuContent">
<div class="titleMenu" id="titleMenu">
<ul>
<li id='mMenu'><span>Menu</span></li>
<li id='settings'><span>Account</span></li>
</ul>
</div>
<div class="navMenu" id="navMenu" >
<ul>
<li><a href="<?php echo $block->getUrl(''); ?>contact">CONTACT US</a></li>
<li><a href="<?php echo $block->getUrl(''); ?>about">ABOUT US</a></li>
<li><a href="<?php echo $block->getUrl(''); ?>#product_link">PRODUCTS</a></li>
<li><a href="<?php echo $block->getUrl(''); ?>" title="<?php /* @escapeNotVerified */ echo $storeName ?>">HOME</a></li>
</ul>
</div>
<div class="accountMenu">
<?php
$group = $block->getGroupName();
$groupCss = $block->getGroupCss();
$groupBehavior = $block->getGroupBehaviour() ? $block->getGroupBehaviour() : '{"tabs":{"openedState":"active"}}';
if ($detailedInfoGroup = $block->getGroupChildNames($group, 'getChildHtml')):
$layout = $block->getLayout();
foreach ($detailedInfoGroup as $name):
$html = $layout->renderElement($name);
if (!trim($html) && ($block->getUseForce() != true))
{
continue;
}
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="headerLinks" id="<?php /* @escapeNotVerified */ echo $alias; ?>" data-role="content"><?php /* @escapeNotVerified */ echo $html; ?></div>
<?php
endforeach;
endif;
?>
</div>
</div>