Apr
07
Trying to work around a bug in WordPress where this code also returns pages!
if($type == "post") {.........}
is also picking up "page" types.
I think its to do with wp_list_pages not resetting the $post values. If anyone else has had this problem take a look at:
http://wordpress.org/support/topic/246823?replies=3#post-1039428
Suggestions most welcome!






Looks like I can fix this by specifying
if(in_the_loop() == ‘true’) {
…………
}
Hope that helps other people.