Sidebar in Sport smt_menu

Latest Reply from Dave at 2017-06-27 06:20:16
It took me a long time to find out why my menus were being displayed incorrectly and then I found that there was a "</div>" in the middle of the menu code.

I tracked it down to this function :


function smt_menu($a) {
$a=preg_replace("/<ul\sclass='children'>/", "<ul class='children'$2><div class='transparent'></div><div class='inner'>", $a);
$a=preg_replace('/<ul\sclass="sub-menu">/', "<ul class='sub-menu'><div class='transparent'></div><div class='inner'>", $a);
$a=preg_replace("/<\/ul>/", "</div></ul>", $a);
return $a;
}


I took out the last line

$a=preg_replace("/<\/ul>/", "</div></ul>", $a);

and it is now displaying correctly.

I don't know whether this is the appropriate correction, but it works.
Hi!

The latest WordPress update has changed the menu structure, that's why we had already updated our themes. You may download the updated version or fix the issue manually. To fix this you need just to find two lines inside the functions.php file of the theme:

<ul\sclass

and replace them with:

<ul\s+class

The functions.php file located inside the theme directory on your server.
Of course you may leave everything as is if you already found a solution.

Leave a reply

Add codeAdd image