OK, I am using this code:
$pages = ( get_pages("child_of=18&sort_column=post_title&title_li="));
foreach ($pages as $page) {
echo '<li><a href="'.$page->post_name.'">'.$page->post_title.'</a></li>';
}
which works like wp_list_pages without adding all the page_item and other classes. All good.
but I'd like to say:
If a specific custom field key exists (let's call it "linkme") do the above logic ELSE just show the title without the link
I think I can write up the output without the link, but I don't know how to test for the specific key...
$pages = ( get_pages("child_of=18&sort_column=post_title&title_li="));
foreach ($pages as $page) {
echo '<li>'.$page->post_title.'</li>';
}
make sense? My question is A) how to test for the specific "linkme" key and if it exists echo the first thing, if not, echo the second.
thanks in advance for any help, ideas, direction, etc!