WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Applying collapse-o-matic to wp_nav_menu

[Resolved] Applying collapse-o-matic to wp_nav_menu

  • xdavidliux
    Member

    @xdavidliux

    Dear kind sir,

    Thank you for sharing this work of yours with the community. I highly appreciate all the time and effort in putting it together.

    I am looking to apply a simple navigation link with your plug-in like so:

    [expand title="ABOUT"]
    <div id="header_menu">
      <ul id="menu">
        <li id="menu-item-58" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-58"><a href="http://localhost:8888/category/">Establishment</a></li>
        <li id="menu-item-60" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-60"><a href="http://localhost:8888/category/">Office</a></li>
      </ul>
      <div class="clear"></div>
    </div><!--//header_menu-->
    [/expand]

    However my theme takes advantage of wp_nav_menu and I couldn’t figure out a way to apply it unless I hardcode the above into the header.php

    Is there a way to apply collapse-o-matic into wp_nav_menu? Am I not understanding something that would allow me to achieve this?

    Thank you very much.
    Dave

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

    EDIT:
    I just realized that hard coding does not work for me. The supposedly ‘expanded’ keyword appears on the page as if it is a content:
    [expand title=”ABOUT”] [/expand]

Viewing 1 replies (of 1 total)
  • Plugin Author Baden
    Participant

    @baden03

    We can try to get you pointed in the right direction.
    First, you might want to read up on how to roll-your-own collapse elements. Basically, this is just creating collapse/expand elements without using the [expand] shortcode.

    Once you understand how this works (don’t worry, it’s actually very simple) then you will want to read up on WordPress nav walkers. This is quite complex, but we’ll try and help you along the way. Here is a great tutorial on nav walkers by Kriesi.at to get you started.

    Once you feel you got your head wrapped around both of these, hit us back and we’ll share some code that will help get you pointed in the right direction.

    -Twinpictures

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Applying collapse-o-matic to wp_nav_menu’ is closed to new replies.