Hi Ying,
Thanks for the reply!
Yes it worked fine, but I need all the posts in Portfolio category to have the submenu toggled displayed, not just one post.
In fact, it would be nicer if the Portfolio item in menu had its submenu automatically populated from the Portfolio category posts. But as I don’t know how to do it, I added each post manually to the submenu.
Maybe if I can make the submenu from category, the CSS should work like this:
body.category-portfolio .widget-area .main-navigation ul ul {
left: auto;
display: block !important;
width: 100%;
transition-delay: 150ms;
}
body.category-portfolio .main-navigation ul.sub-menu {
opacity: 1;
visibility: visible;
overflow: visible;
position: relative;
pointer-events: auto;
height: auto;
padding-left: 0.75em;
padding-bottom: 2em;
}
@media (max-width: 768px) {
.category-portfolio #generate-slideout-menu.main-navigation ul ul {
display: block;
}
}
But, as long as I added all the submenu items manually, it doesn’t work.