I am creating a shortcode. The shortcode will output a list of pages with the wp_list_pages() function. I am using the ('title_li') parameter and the list headline will be removed, because it is left empty and the "ul tag" will be removed as well, which is not desired.
http://codex.wordpress.org/Function_Reference/wp_list_pages#Hiding_or_Changing_the_List_Heading
Now I am trying to wrap it in ul tag again. This is what I am trying but it will return list of pages in "li" with out the "ul tag".
function sitemap_function() {
$return_string .= "<ul>";
$return_string .= wp_list_pages('sort_column=menu_order&title_li=');
$return_string .= "</ul>";
return $return_string;
}
function register_shortcodes() {
add_shortcode('sitemap', 'sitemap_function');
}
add_action('init', 'register_shortcodes');
Hope someone can help me out here. Thanks in Advance.
