• I’m trying to get WordPress pages; not in a list tag, to print out in one line. The output pages is in alphabetical order. How can I get the page number as the user sets them 0,1,2,3 in the CMS dashboard editor?

    <div class="col-md-12">
    
    <hr style="border-top: 1px solid rgba(255, 255, 255, 0.2);">
    
    <?php
    $pages = get_pages(); 
    
    if (count($pages) > 0) {
      echo '<div class="endnav">';
      foreach ( $pages as $page ) {
        echo '<a href="' . $page->guid . '" title="' . sprintf(__('View page %s', 'localhoster'), $page->post_title) . '">' . $page->post_title . '</a><span class="sper-dot"> ? </span>';
      }
      echo '</div>';
    }// end if
    ?>
    </div>
Viewing 1 replies (of 1 total)
  • Thread Starter xi33lwv0o

    (@xi33lwv0o)

    Also the home page url output is localhost/wordpress/?page_id=679

    Is there anyway I can edit that to be localhost/wordpress/

Viewing 1 replies (of 1 total)
  • The topic ‘get_pages sort_order normal;’ is closed to new replies.