what I need is for the output to be like…
<a href=http://whatever.com>like this</a>
instead the output is currently like this
<a href=http://whatever.com>like this</a>
You are missing the ampersand symbol from in the bottom line of your code.
the extra space after echo=0 ...order&echo=0 '); is for some reason stopping this parameter from getting applied – what you see is the direct output from ‘wp_list_pages()’
try with ...order&echo=0');
the str_replace will then actually work on all spaces in the html string – including the useful ones in the html tags – and therefore breaking the whole output 🙁
it will probably need someone with a good knowledge of ‘preg_replace’ …
The easiest way might be to rename the Pages themselves?
@duckboy
I had the ampersand in the original code, but when I edited this post to fix a spelling mistake the whole nbsp thing got replaced as a space here and when I edited the post a 3rd time to put it back I forgot the ampersand.
@alchymyth
Thank you very much, I was starting to think I would have to alter the core wordpress files themselves (which means I’d probably have to do it after every update), I’ll go and have a look at what you posted :-).
@chip Bennett
Not really feasible, this is on my wifes wordpress blog and she doesn’t know any of this “web stuff”