Martin Black
Member
Posted 6 months ago #
Is there anyway I can use wp_list_pages() to generate a list of my pages with no styling at all, i.e. just the <a href=""> (links) only?
Would get_pages have to be used instead, possibly with a foreach to output as just links?
Any ideas?
Thanks
Martin Black
Member
Posted 6 months ago #
Managed to achieve this as follows:
<?php
$pages = get_pages('sort_column=menu_order&title_li=');
$content .= "<span>";
foreach ($pages as $pagg) {
$content .= '<a href="'.get_page_link( $pagg->ID ).'">'.$pagg->post_title.'</a>'; }
$content .= "</span>";
echo $content;
?>