Как сделать выпадающее меню на php?
Всем привет! Как сделать чтобы при нажатии мыши на слово открывалось следующее подменю? Имеется сайта на WordPress. Через конструктор ничего не редактируется, только какие-то основные моменты. Нашел файл sidebar.php с кодом. Я так понимаю, что нужно именно здесь и редактировать
<aside class="sidebar">
<ul class="sidebar-menu">
<?php foreach( get_categories(array('hide_empty' => 0)) as $category ): ?>
<li class="sidebar-menu__item">
<a href="<?= get_category_link( $category->term_id ) ?>" class="sidebar-menu__link arrow arrow_right"><?= $category->name ?></a>
</li>
<?php endforeach; ?>
</ul>
</aside>
В интернете порылся и ничего не нашел подходящего.
Сам в php не шарю.

Нашел файл с надписью sidebar.less. Других подходящих нет Получается нужно редактировать в этом файле?
.sidebar {
//flex: 0 0 260px;
//max-width: 260px;
width: 260px;
height: auto;
float: left;
border-radius: 0 0 5px 5px;
border: 2px solid @primary;
border-top: none;
margin-top: -1.5em;
}
.sidebar-menu {
list-style: none;
padding-left: 0;
margin: 0;
&__item {
font-size: .93em;
position: relative;
&::after {
content: '';
position: absolute;
top: 0;
left: 1.43em;
right: 1.4em;
height: 1px;
background-color: #eee;
}
&:first-child::after {
display: none;
}
}
&__link {
display: block;
padding: 1.13rem 1.13rem 1.13rem 2.6rem;
text-decoration: none;
position: relative;
cursor: pointer;
&:hover {
color: @primary;
}
}
}
