2

HI all, I need to change the title of some pages before they are output on a list via wp_list_page. I don't want to change the page title in the backend To be clear, my list displays $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&exclude=&depth=1"); Intro Page 1 Page 2 Page 3

I need to change the name of Intro to be Special

Thx s

1

Very crude way of doing it:

<?php
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&exclude=&depth=1");
$children = str_replace("Intro", "Special", $children);
?>

Or alternatively you can look at using the new menus feature in WordPress 3.0. Build up you menu of pages, and in there you can assign a different menu name to the page title.

http://en.support.wordpress.com/menus/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.