StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-19-2009, 01:04 PM
CharlesClarkson's Avatar
CharlesClarkson CharlesClarkson is offline
Community Moderator
 
Join Date: Feb 2009
Location: Stephenville, TX, USA
Posts: 11,356
Default Re: Custom field value with wp_list_pages

Quote:
Originally Posted by erikong
Hmmm, I think the meta_key and meta_value parameters are used to filter the selection of pages to display, instead of display a custom field value in the title.

I was looking more if the get_post_meta can be used in conjunction with the title_li parameter of wp_list_pages?
I was heading out to mow some lawns when I miss-read your question.

I think you will have to use a filter. Looking at the source code, I found 'wp_list_pages' is called before the function returns.

Tail end of wp_list_pages() function:
Code:
	$output = apply_filters('wp_list_pages', $output);

	if ( $r['echo'] )
		echo $output;
	else
		return $output;
}
Add something like this to the Church Theme's functions.php file (untested):
Code:
add_filter('wp_list_pages', 'sp_adjust_page_menu');

function sp_adjust_page_menu ($output) {
	return str_replace( 'Very Long Page Title', 'Short Page Title', $output );
}

HTH,
__________________
Charles "Rubeus Hagrid" Clarkson
StudioPress on Facebook

I'm not really a smart person. I just play one on the Internet.

Please use the HTML or PHP tags for pasting code.
Please make your links click-able: this_is_annoying.com
http://this_is_not_annoying.com.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CUSTOM FIELD, NEED HELP october-29 General Discussion 2 12-22-2008 08:14 AM


All times are GMT -5. The time now is 02:59 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.