The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress menu classnames Re: WordPress menu classnames


I’m new to the whole hacking wordpress so if this isn’t the WordPress Approved Method, I’d like to know the answer as well.

But it seems to me you can basically just add stuff like this:

<div class="bbcode_code">
  <div class="bbcode_code_head">

  <div class="bbcode_code_body" style="white-space:pre">
    //Get the stuff from wp_list_pages $myvar = wp_list_pages('echo=0&title_li='); // Find the li to add a class to $var1 = '<li class="'; $var2 = '<li class="myclass '; //Find the a to add a class to $var3 = '<a'; $var4 = '<a class="myclassa" '; // Replace var1 with var 2, and var 3 with var 4. $myvar = str_replace($var1, $var2, $myvar); $myvar = str_replace($var3, $var4, $myvar); //print out the resulting stuff print "myvar = " . $myvar;