Forums

change order of nav. bar (16 posts)

  1. jaytime
    Member
    Posted 1 year ago #

    I need to find a simple way to change the order of my pages in my Nav. bar. I have, about, blog and home. I want home to be first. I would prefer not to "hack" the code..I know it's not wrong to change the code, but I don't want to mess anything up...and I'd just prefer not too...I loked at http://codex.wordpress.org/Template_Tags/wp_list_pages

    as well as several forum posts and I still can't figure it out. I can't even find where to put the changes from the link above if I wanted to do it.

    I also tried the mypageorder plug in and that did not do anything, although I can't be sure I did everything right as it said to change something in the code and I simply don't know what "files" to find the code that needs changing. I'm brand new to WP and to the code and it all looks greek to me....please help.

  2. moshu
    Member
    Posted 1 year ago #

    At the Codex page you linked to... look for the Page order section + add the order numbers in your admin panel, as described there.

  3. jaytime
    Member
    Posted 1 year ago #

    I see what your telling me to look at. but where do I put the code? I don't understand their instructions....where in my admin panel?

  4. jaytime
    Member
    Posted 1 year ago #

    Can anyone please help me?

  5. adamrbrown
    Member
    Posted 1 year ago #

    where in my admin panel?

    Nowhere. wp_list_pages is a template tag. Template tags go into your theme files. Go into your theme, find the file with wp_list_pages in it (probably header.php), and modify it there.

  6. jaytime
    Member
    Posted 1 year ago #

    I have looked in my themes..I looked in header, stylesheet, main index templete,sidebar and page temples...I can't find "wp_list_pages" anywhere...any ideas?

  7. adamrbrown
    Member
    Posted 1 year ago #

    Wait, are we talking about the "pages" widget here?

    Giving your URL may help.

  8. jaytime
    Member
    Posted 1 year ago #

    I don't think so...just the nav. bar that came with the templete...I got the templete from here...http://themes.wordpress.net/columns/2-columns/563/beach-house-121/

  9. moshu
    Member
    Posted 1 year ago #

    Now, what do you call "nav.bar"?
    The horizontal menu or the sidebar?

  10. jaytime
    Member
    Posted 1 year ago #

    sorry, I seem to be making this more difficult with my lack of the lingo...... The horizontal bar...with what I believe has the "pages" there...such as home, about, etc.

  11. moshu
    Member
    Posted 1 year ago #

    Then you got all the information above regarding what to do. It is a two (2) step process:
    1. You add the necessary parameter to your wp_list_pages tempate tag
    2. You go to your own admin panel and give Pages their order number (while editing them one by one)

    The template tag is most likely in the header.php template file of your theme.

  12. jaytime
    Member
    Posted 1 year ago #

    I don't know what a parameter to my wp list page templete tag means...
    I don't know what a parameter is and I don't know where my wp_list page templete is..I don't have anything that is called wp_list-page templete or anything like it...

    I went to my "pages" in my admin. panel and where it asked to number the page I have done that...but they still show up in alphabetical order

    I'm not trying to be difficult, I simply don't understand what you mean by the above...

  13. jaytime
    Member
    Posted 1 year ago #

    Can anyone help me please?

  14. geekgirl
    Member
    Posted 1 year ago #

    Go to presentation then theme editor. Click on header.php...there should be a code inside there that says wp_list_pages...that should get you started, then follow the above directions that Moshu gave you.

  15. jaytime
    Member
    Posted 1 year ago #

    Below is my header.php...I can't find anything that says "wp_list_pages" I realize I may simply be overlooking it...if so, please tell me where it is, I have been looking over this code for a week...

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page" <?php if (is_home()) echo " class=\"singlecol\""; ?><?php if (is_page()) echo " class=\"singlecol\""; ?><?php if (is_archive()) echo " class=\"singlecol\""; ?>>
    <div id="header">
    <div id="headerimg">
    <h1>/">
    <?php bloginfo('name'); ?>
    </h1>
    <div class="description">
    <?php bloginfo('description'); ?>
    </div>
    </div>
    </div>
    <!-- navigation ................................. -->
    <div id="navigation">

      <?php
      $pages = get_pages();
      if ($pages) {
      foreach ($pages as $page) {
      $page_id = $page->ID;
      $page_title = $page->post_title;
      $page_name = $page->post_name;
      if ($page_name == "archives") {
      (is_page($page_id) || is_archive() || is_search() || is_single())?$selected = ' class="selected"':$selected='';
      echo "<li".$selected.">Archives\n";
      }
      elseif($page_name == "home") {"";
      }
      elseif($page_name == "about") {
      (is_page($page_id))?$selected = ' class="selected"':$selected='';
      echo "<li".$selected.">About\n";
      }
      elseif ($page_name == "about_short") {/*ignore*/}
      else {
      (is_page($page_id))?$selected = ' class="selected"':$selected='';
      echo "<li".$selected.">$page_title\n";
      }
      }
      }
      ?>

    </div>
    <!-- /navigation -->
    <hr />

  16. ShaneMcC
    Member
    Posted 1 year ago #

    jaytime. I think we just had the same problem. It was solved as follows:

    1. Make sure your page orders are correct in the Manage->Pages->Page Orders fields e.g. /wp-admin/page.php?action=edit&post=7
    The lowest number will appear on the left in your nav bar.

    2. Then go to Presentation->[theme] options (at least it worked for us in Tarski). You'll then see your list of pages that you want to include in the correct order. Click on Update Options and the change should be reflected in the site.

    I expected it to be a one stage process in Page Orders but it was only after updating the theme options that it affected the site.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.