//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 stuffprint \"myvar = \" . $myvar;
I can't find any way to manually edit the classes applied to my wp_list_pages(); function. I would really like to have classes applied to the a-tag as well as the li-tag.
Anyone know of a useful plugin or something?
I'm afraid there's no standard way of doing it.
But it seems to me you can basically just add stuff like this: