WordPress.org

Ready to get started?Download WordPress

Forums

Add Menu Class to First Child (Page Menu) (2 posts)

  1. bk_design
    Member
    Posted 3 years ago #

    Hi, I am hoping someone can help me out. I am trying to add a unique id and class to the first drop down of my menu on http://www.designremedyinc.com/indyme to expand the width and make it into 2 columns. My thought is to add a class just to that first ul class="children". I was able to find some code online to add add_menuclass function however this adds the class to the first

      I tried to change the code below to

      function add_menuclass($ulclass) {
      return preg_replace('/

      /', '<ul id="solutions" class="dropdown">', $ulclass, 2);
      }
      add_filter('wp_page_menu','add_menuclass');

      Thinking that $ulclass, 2 would address the second

      this works for the first
      but not the second. Any help would be greatly appreciated.

      Thanks

  2. bhuwanroka
    Member
    Posted 3 years ago #

    ok

Topic Closed

This topic has been closed to new replies.

About this Topic