• Resolved jonathansadler

    (@jonathansadler)


    Can’t seem to get the following to work correctly, The child drop down menu isn’t formatted properly because the <u>tag is not being changed to the <u> and <div> tags.
    Using this code in a theme:

    Pastebin: https://pastebin.com/raw.php?i=2stm1mJr

    but the following line isn’t creating any output:
    else if (substr($line, 0, 4) == "<ul>") $line = str_replace("<ul>", '<div class="drop-wrap columns-1 png"><div class="png drop1"></div><ul class="png columns-1">', $line);

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think it is because your <ul> tag is really <ul class='children'>, so the line is not being processed.

    Try using this instead:

    else if (substr($line, 0, 20) == "<ul class='children'") $line = str_replace("<ul class='children'", '<div class="drop-wrap columns-1 png"><div class="png drop1"></div><ul class="children png columns-1">', $line);
    Thread Starter jonathansadler

    (@jonathansadler)

    Perfect. Thank you very much, I could see it was something around that, just couldn’t quite get to it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Menu not working: else if (substr($line, 0, 4) == ""’ is closed to new replies.