Support » Plugins » Hacks » get_pages and meta data – not getting pages at all

  • I’ve looked over probably a dozen help sites on this, tried most and I just can’t get this working…

    What I want is pretty simple, wp_list_pages functionality with metadata so that it can be made pretty, rather than a bland UL.

    This gives the desired array in output, without the meta of course, but it works fine.

    echo wp_list_pages('meta_key=work-issue&meta_value=2010&meta_key=work-type&meta_value=fic') ;

    But when I try modified versions of what’s here, for example, I get absolutely nothing. Not even an error.

    I suppose conceptually this scaled down code should work, but obviously doesn’t (just trying to print at least the ID to demonstrate that it works right now, but of course need more than that):

    $customlist = get_pages('meta_key=work-issue&meta_value=2010&meta_key=work-type&meta_value=fic');
    	foreach($customlist as $page) {
    	echo $page->ID;

    Do I need to hack a full custom query? Does get_pages not work for something like this? What am I missing?!


  • The topic ‘get_pages and meta data – not getting pages at all’ is closed to new replies.