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 Answer
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.

Menus

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *