Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter daniello

    (@daniello)

    Ok, Tim.
    I sent an email to you with the temp login! Please respond so that I know if you got the email ?? /Daniel

    Thread Starter daniello

    (@daniello)

    Ok Tim.
    Thanks again for your fast replies!!! But I think you understand what I want to acchieve, right???? But all menuitems from “LANKANNONSER” to “OM JOHN” are pages. The submenu items are connected to “Parent” below “Attributes” in the WP admin panel (administrating “Pages”) … So they all have to be pages..?!
    If you want Tim I can set you up for a temporary admin account so that you can see the listing for yourself in the WP admin interface!

    Here’s the code:

    php code:

    <ul id="qm0" class="qmmc" style="">
    <li><a href="https://blogger.steinberg.se/" title="Hem">HEM</a></li>
    <li><span class="qmdivider qmdividery"></span></li>
    <li><a class="qmparent" href="javascript:void(0);" title="Kategorier">KATEGORIER</a>
    <ul class="wordp_listsubs">
    wp_list_cats(class=&category_order=ASC);
    </ul>
    </li>
    your code to list pages went here...
    <li><span class="qmdivider qmdividery"></span></li>
    <li><a href="https://www.steinberg.se/contact/" title="Kontakt">KONTAKT</a></li>
    <li class="qmclear">&nbsp;</li>
    </ul>

    (I had to erase your code from the post since it was causing problems when I posted… But yor code above should be placed where the text “your code to list pages went here…” is placed above…)

    js code can be downloaded from here:
    https://www.steinberg.se/inc/css_menu.js

    css code can be downloaded from here:
    https://www.steinberg.se/css/css_menu.css

    Thread Starter daniello

    (@daniello)

    Thanks guys!
    Technokinetics: it sort of works ?? But for some strange reason it puts <li><span class="qmdivider qmdividery"></span></li> before “OM DENNA BLOGG”, but not before “LANKANNONSER” AND “OM JOHN”???? Strange!? Your code is doing what I wanted but not between all the toplevel items????

    Any idea? Thanks! /Daniel

    Thread Starter daniello

    (@daniello)

    Tim.
    Thank you for your response, but could you be a little bit more specific. I’m not that experienced of how to handle all the wordpress functions ;-(
    Could you give me an example? That would be really appreciated! Thank you… /Daniel

    Thread Starter daniello

    (@daniello)

    Hi again.
    One solution would be to assign an extra class to all the top level parents (as shown inside <strong> in the example output below):

    <li class="<strong>mainitem</strong> page-item page-item-30">
      <a href="javascript:void(0);" title="Pages">Pages</a>
      <ul>
        <li class="page-item page-item-40"><a href="link-to-submenu-item1" title="link-title1">Link-desription1</a></li>
        <li class="page-item page-item-41"><a href="link-to-submenu-item2" title="link-title2">Link-desription2</a></li>
        <li class="page-item page-item-42"><a href="link-to-submenu-item3" title="link-title3">Link-desription3</a></li>
      </ul>
    </li>
    <li class="<strong>mainitem</strong> page-item page-item-50">
      <a href="link-to-contact" title="title-contact">Contact</a>
    </li>
    <li class="<strong>mainitem</strong> page-item page-item-60">
      <a href="javascript:void(0);" title="Others">Others</a>
      <ul>
        <li class="page-item page-item-70"><a href="link-to-submenu-item1" title="link-title1">Link-desription1</a></li>
        <li class="page-item page-item-71"><a href="link-to-submenu-item2" title="link-title2">Link-desription2</a></li>
        <li class="page-item page-item-72"><a href="link-to-submenu-item3" title="link-title3">Link-desription3</a></li>
      </ul>
    </li>

    After that I could do a str_replace. But how do I assign that class only to the top level main menu items???
    If you take a look at the menu on https://blogger.steinberg.se/ I would like this mainitem class assigned to “HEM”, “KATEGORIER”, “LANKANNONSER”, “OM DENNA BLOGG”, “OM JOHN” and “KONTAKT”… /Daniel

Viewing 5 replies - 1 through 5 (of 5 total)