E
E
Egor2015-08-28 12:04:54
User navigation
Egor, 2015-08-28 12:04:54

Keeping the menu you are in [WordPress] open. How?

Hello, I ran into a problem, the menu accordion, when you click on a link in the menu, is automatically hidden, you need to make sure that it is not hidden, but remains open on the directory you went to. Who knows how to do it?
Googled all night and all in vain.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr Crabbz, 2015-08-28
@Punkie

If the menu display is implemented through the standard WP functionality, then the engine usually assigns a class like "current" or the like for the current menu item.
Just use javascript when loading the page, look for li.current (li is the default container of the menu item, maybe it’s different in your theme, of course) and open it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question