• Resolved childrensfitness

    (@childrensfitness)


    If you go to my site at:
    https://www.lensaunders.com/wp/
    You will see a top nav bar with 3 options.

    The order is, HOME CONTACT TERMS

    I would like to get the order to be, HOME TERMS CONTACT

    I can’t get it to switch. Does anyone know how to do this?
    I have deleted them all, re-did it in the correct order, but nothing works.

    Thanks.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter childrensfitness

    (@childrensfitness)

    okay, I thought I had it, but it switched back. There has got to be a way to do this that I am missing. Can anyone help out. Thanks.

    ekusteve

    (@ekusteve)

    You will need to find the file in your theme where this code is entered…probably in your header.php file. Then just reorder the code to what you want.

    Steve

    Thread Starter childrensfitness

    (@childrensfitness)

    Not sure if I know how to do this. I have put the code for the header below. Is there anyplace that shows the order of the nav bar? Thanks.

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”&gt;
    <?php require_once get_template_directory().”/BX_functions.php”; ?>
    <html xmlns=”https://www.w3.org/1999/xhtml&#8221; xml:lang=”en” lang=”en”>
    <head>
    <title><?php bloginfo(‘name’); wp_title(); ?></title>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘charset’); ?>” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” />
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen, projection” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php /*comments_popup_script(520, 550);*/ ?>
    <?php wp_head();?>
    </head>

    <body>
    <div id=”container”<?php if (is_page() && !is_page(“archives”)) echo ” class=\”singlecol\””; ?>>
    <div id=”bloginfo”>“><?php bloginfo(‘name’); ?> <?php bloginfo(‘description’); ?></div>
    <!– header …………………………… –>
    <div id=”header”>
    <!– <h1>“><?php bloginfo(‘description’); ?></h1>–>
    </div>
    <!– /header –>

    <!– navigation …………………………… –>
    <div id=”navigation”>

    <form action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>” method=”get”>
    <fieldset>
    <input value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”s” />
    <input type=”submit” value=”Go!” id=”searchbutton” name=”searchbutton” />
    </fieldset>
    </form>

      <li<?php if (is_home()) echo ” class=\”selected\””; ?>>“>Home
      <?php
      $pages = BX_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 == “about”) {
      (is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”;
      echo “<li”.$selected.”>About\n”;
      }
      elseif ($page_name == “contact”) {
      (is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”;
      echo “<li”.$selected.”>Contact\n”;
      }
      elseif ($page_name == “about_short”) {/*ignore*/}
      elseif ($page_name == “home”) {/*ignore*/}
      else {
      (is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”;
      echo “<li”.$selected.”>$page_title\n”;
      }
      }
      }
      ?>

    </div><!– /navigation –>

    <hr class=”low” />

    ekusteve

    (@ekusteve)

    I’m not an expert…more of a hacker, but when I look at the source code on your homepage I see this something like this.

    Okay…I couldn’t get the code pasted in correctly…see the picture here.

    https://www.georgetownprofessor.net/code.jpg

    Steve

    Thread Starter childrensfitness

    (@childrensfitness)

    Thank you very much for your reply Steve. I understand what you are saying, but I am having a very hard time finding where it is in my folder. I think I am going crazy…

    ekusteve

    (@ekusteve)

    What theme are you using? If it’s available for download somewhere, send me the link and I’ll look at it.

    Steve

    Thread Starter childrensfitness

    (@childrensfitness)

    ekusteve

    (@ekusteve)

    Interesting theme….Okay, here is what I did to get it to work.

    Open the BX_functions.php file in your theme folder.

    Around line 91 you will see a line of code like this:
    ———————————
    $query = “SELECT ID, post_title, post_name FROM ” . $wpdb->posts . ” WHERE post_status=’static’ ORDER BY menu_order ASC”;
    ———————————
    Change the text after ORDER BY so that the line reads like this:
    ——————————–
    $query = “SELECT ID, post_title, post_name FROM ” . $wpdb->posts . ” WHERE post_status=’static’ ORDER BY post_title DESC”;
    ——————————–

    Then do the same thing a couple of lines down where you see the same code.

    Steve

    Thread Starter childrensfitness

    (@childrensfitness)

    Wow Steve, that was quite impressive how you figured that out, really impressive. I could never do anything like that on my own. I love this theme, and want to keep it as long as I can. The only problem is the menu you helped me with does not function in Word Press 2.1. That is why I still have Word Press 2.0.7. Everything in the theme works properly in 2.1 except that nav bar. If you know a fix for that as well, now that you have the theme, please let me know. Again, thank you so much for your generosity and time.

    ekusteve

    (@ekusteve)

    You’re welcome…I did notice that it didn’t work in 2.1. I’m headed out the door this evening, but will take a look at it sometime this weekend and will post back here if I can find a solution.

    Maybe someone else will know a quick solution and will post before then….I’ll check back tomorrow and if nothing has been posted I’ll dig into it. The home link does show in the nav bar in 2.1…it’s just that the pages don’t show. Shouldn’t be too difficult to solve that.

    Steve

    Thread Starter childrensfitness

    (@childrensfitness)

    Thanks Steve, if you can fix it, I’d be very grateful. I will check back over the weekend. Thank you so much for your expertise.

    moshu

    (@moshu)

    Well, I told you in another thread to get rid of that blix-clone… but you seem to be a stubborn guy (I understand that, I’d do the same, LOL).

    As for the code not working in 2.1: yes, i will not work because Pages are handled differently in 2.1.
    Tell steve to read my post about it ??

    ekusteve

    (@ekusteve)

    [Moshu] Thanks for the tip on the change in pages.

    [Childrensfitness] Go back to the same place where you made the last changes and just before ORDER BY you will see:

    WHERE post_status=’static’

    Change this to:

    WHERE post_type=’page’

    Do the same in both places where you made the previous changes.

    Now your theme (or at least this part…I haven’t tested other things) will work with 2.1 like here:

    https://www.georgetownprofessor.net/blogs/spring07/shyndman1

    Okay…now I’m really heading out the door…see you later.

    Steve

    Thread Starter childrensfitness

    (@childrensfitness)

    Okay, it’s a start. The nav bars are working. The only problem I can see is that the ‘Home’ page does not load. When I used Word Press 2.0.7, I used the plug-in for a static front page. That is not supported in WP 2.1. So when you sign in to my page, for some reason now, the original home page does not load. It shows my latest posts instead of the home page.

    When I use the built in static page from WP 2.1, the home page shows, but it does not show any of the side navigation. Not sure if this makes sense.

    I took images of it to help explain. When I use the WP 2.1 build in static page, and make my home page static, it looks like this:
    https://exercise.cabspace.com/static.gif
    The problem, no side navigation.

    When I undo this, and have no static page, the home page disappears, and you see my most recent posts. It looks like this:
    https://exercise.cabspace.com/nostatic.gif

    I hope the image links work.

    Please let me know what you think. I am so impressed with your knowledge.

    https://www.lensaunders.com/wp/

    ekusteve

    (@ekusteve)

    I played with it a little bit this morning, but I can’t seem to get everything working exactly right. Every time I get something working, it introduces a new problem…typical with these type things.

    I’m not really that good with CSS and PHP coding so I could easily spend all day trying to chase down everything that a capable programmer could do in 15 minutes.

    It shouldn’t be too difficult for a knowledgeable person to get the sidebar to display properly on the page views…I’ve sort of got it working, but it’s not right…the page content pushes the sidebar down (I’m sure this is a styling issue) and when you click on a category to see posts you see a second category area show up in the sidebar. The sidebar code for this theme is a lot more “complicated” that in the default theme.

    https://www.georgetownprofessor.net/blogs/spring07/shyndman1/

    I’ll have to leave this to someone else with more knowledge…got to do some “less fun” stuff around the house today. Good luck.

    Steve

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Nav Bar Question’ is closed to new replies.