Replace text from wp_list_pages
-
I create display list of parent and their child page use this code
function my_list_child_pages() { if (is_page()) { global $post; $args = 'echo=0&sort_column=menu_order&title_li='; // Check whether page is parent/child page $page = ($post->post_parent) ? $post->post_parent : $post->ID; $parent = wp_list_pages( $args.'&include='.$page ); $children = wp_list_pages( $args.'&child_of='.$page ); // If the current page has/is child page $list = ($children) ? '<ul class="disease-nav">'.$parent.$children.'</ul>' : ''; } return $list; } add_shortcode('wpb_childpages', 'my_list_child_pages');Page A
– Page A1
– Page A2output:
Page A
Page A1
Page A2I want to replace text output Page A without edit title from wp-admin. I want to result is
Overview
Page A1
Page A2Anyone ever create function like that?
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Replace text from wp_list_pages’ is closed to new replies.