Hi, I’m picking up after:
sandwiched inside this code i have this:
<?php wp_list_pages(); ?>
which creates a loop within a loop, which is obviously wrong. However, it’s spitting out this loop 7 times which is consistant with the number of pages with the key I’m calling.
I get the same result as public_radio when I use ‘wp_list_pages()’ – it displays all of the pages Twice, which is how many Pages have the custom key/value pair I am querying (i.e. 2 Pages)
Basically, I’m trying the same thing with a leftnav, rightnav for the Pages – I want some of the Page links to be in the Sidebar, some of the Page links to be in the header.
I tried doing the following:
foreach($my_posts as $post) :
echo $my_posts[1];
endforeach;
Basically, this was just a test to see what $my_posts[1] returned. But, I received the following error:
Object of class stdClass could not be converted to string
I looked it up, and it appears to be an issue with PHP 5.2; you can’t echo out the array’s data.
How can I pull out the data from this $my_posts array? Somehow I need to convert the data from $my_posts to a string… any ideas?