WordPress.org

Ready to get started?Download WordPress

Forums

WP List pages loop (5 posts)

  1. connorz
    Member
    Posted 4 years ago #

    Hi,

    So here's the deal: I'm trying to create a menu of all of my pages on my wordpress site. However, in order to fit in with the dropdown menu I created, I need to add special classes to all li's and a different one to sub ul's. I thought the easiest way to do this would be to generate the menu manually through a loop. How do I do this? Or is there an easier way to achieve what I want?

    Thanks, I appreciate all of the help.

  2. xdesi
    Member
    Posted 4 years ago #

  3. connorz
    Member
    Posted 4 years ago #

    Kind of...However I'm looking for a way to manually do the PHP loop, so that I can add classes to certain elements in the list.

  4. connorz
    Member
    Posted 4 years ago #

    Nevermind. I resolved it by changing what I had already done with Javascript.

  5. revolutionfrance
    Member
    Posted 4 years ago #

    Hey! Would you mind sharing how you did it with javascript for adding classes to the sub ul's. I actually need to add several divs before the sub uls... Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic