• Resolved Martin Black

    (@ownedbyhleb)


    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

Viewing 1 replies (of 1 total)
  • Thread Starter Martin Black

    (@ownedbyhleb)

    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;
    				  ?>
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Page List (only a href links, no styling).’ is closed to new replies.