I’ve added the fields “listetittel” and “listetekst” to ever page in my WordPress installation, and have tried several modified versions of the scripts above; but nothing works.
This is what I do:
<ul>
<?php
$pages = get_pages('title_li=Verda&child_of=33&echo=0');
$count = 0;
foreach($pages as $page)
{
$content = $page->post_content;
if(!$content)
continue;
if($count >= 2)
break;
$count++;
$content = apply_filters('the_content', $content);
?>
<li id="pages"><a>ID) ?>"><?php echo $page->post_title ?></a>
<li class="sub-list"><?php echo get_post_meta($page->ID,'listetittel',true); ?>
<?php
}
?>
</ul>
What’s wrong? Help! 🙂