Meta field content in page listing?
-
Hi there,
I’m trying to develop a replacement function for wp_list_pages which can pull in meta field content, and I just can’t figure it out. Okay, admittedly I’m probably in over my head, but that’s what’s so fun about PHP, right?
The existing code I’d like to be able to swap out is this:
$page_tree[$page->ID]['title'] = $page->post_title;
$page_tree[$page->ID]['name'] = $page->post_name;I’m trying to get something like this in here using the get_post_meta function:
$page_tree[$page->ID]['title'] = get_post_meta($postdata->ID, 'other-title', true);
But I’m getting a blank value there.Anyone had any luck with something like this?
Thanks,
Jeremy
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Meta field content in page listing?’ is closed to new replies.