WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_list_pages Customization? (2 posts)

  1. groq
    Member
    Posted 5 years ago #

    Hi,

    I'm working on trying to display a list of my pages using the wp_list_pages function. Instead of showing the title of the page, I want to display the value of the meta_key for that page. I hacked the classes.php file a little bit to get the stylings I want, but I can't figure out how to get it to display the custom field. Here's my current code from the classes.php file:

    $output .= $indent . 'ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . '<div class="left-links">' . '<img src="px/small_link.png" border="0">' . ' ' . apply_filters('the_title', $page->post_title) . '</div>' . '';

    Any ideas or suggestions will be greatly appreciated. Thanks in advance.

    -groq

  2. groq
    Member
    Posted 5 years ago #

    Ok, I figured it out guys. I changed this piece of code:

    apply_filters('the_title', $page->post_title)

    to

    `apply_filters('the_title', $page->meta_value)'

    Cool!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags