Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 600411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:36:11+00:00 2026-05-13T16:36:11+00:00

In order to make use of a particular jQuery menu in WordPress, I need

  • 0

In order to make use of a particular jQuery menu in WordPress, I need the child UL (dropdown part of the menu) to have a selector added to it (third line, below):

<ul class=”dropdown”>
    <li>the first list item
        <ul class=”sub_nav”>
            <li>child list item</li>
        </ul>
    </li>
</ul>

Note: I left out the link code for greater clarity.

I’m not a coder. My PHP and javascript skills are of the copy-paste-tinker variety. Other forums have yielded lots of vague suggestions, but no solutions. I’m open to other solutions, but I’d like to solve it in one of two places:

  1. Modify <#?php wp_list_pages(‘title_li=&depth=2’); ?> in the theme header.php file
    [had to add # to code bit to make it show up]

  2. Add a function in the theme functions.php file

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:36:12+00:00Added an answer on May 13, 2026 at 4:36 pm

    Mike Little of zed1.com furnished a solution on a LinkedIn forum:

    In the theme functions file:

    class My_Walker_Page extends Walker_Page {
    function start_lvl(&$output, $depth) {
    $indent = str_repeat(“\t”, $depth);
    if (0 == $depth)
    $output .= “\n$indent<ul class=\”sub_menu\”>\n”;
    else
    $output .= “\n$indent<ul>\n”;
    }
    }

    In the header file where menu is to appear:

    <ul class=”dropdown”><?php $walker = new My_Walker_Page;
    wp_list_pages(array(‘title_li’=>”, ‘depth’ => 2, ‘walker’ => $walker)); ?></ul>

    Mucho gracias to Mike Little, who was a founding member of the WordPress team.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use to make use of wildcards in a Makefile in order to select
My program needs to make use of void* in order to transport data or
Sometimes in order to make our application more responsive and fast, we use client
I need to make some operations on a list of files with particular extension
In order to make my program more streamlined (Without try and catch everywhere), I
In order to make bundle work on its own i would like to call
in order to make things easier for users i want to add multiple keyword
in order to make sure all form submission and all data submitted to server
It appears that in order to make TinyMCE work with an ASP.NET AJAX website,
I used 320andup in order to make my first real responsive website. I managed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.