Treehouse: Grow your CSS skills. Land your dream job.

wp nav args

  • # March 14, 2013 at 6:13 am

    Most of the stuff I am taking from the codex for my nav doesn’t seem to be working.

    < ?php wp_nav_menu( array( 'container_class' => ‘group’ , ‘items_wrap’ => ‘%3$s’ )); ?>

    It should be adding the class ‘group’ to the container as stated from the codex:

    (string) (optional) The class that is applied to the container

    It only gives the the class of menu still. Also, the last strand should remove the ul tag from the menu, which is not working either.

    I tried using ‘menu_class’ which works, but codex says that should only apply to the ul tag, so I can add the class group and menu, but then would need to target the ul to add the class group also.

    Any ideas?

    # March 14, 2013 at 7:50 am

    Hi Jeager,

    From codex:
    []( “”)

    $items_wrap (string) (optional)

    Evaluated as the format string argument of a sprintf() expression. The format string incorporates the other parameters by numbered token. %1$s is expanded to the value of the ‘menu_id’ parameter, **%2$s is expanded to the value of the ‘menu_class’ parameter**, and %3$s is expanded to the value of the list items. **If a numbered token is omitted from the format string, the related parameter is omitted from the menu markup**.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.