WordPress.org

Ready to get started?Download WordPress

Forums

Duplicate link to "About" in Navigation (9 posts)

  1. leslie555
    Member
    Posted 5 years ago #

    Hello, I've started to use the blixkrieg theme. I've downloaded the adsense version but have turned off the ads for now. For some reason it is showing 2 occurrences of "About" but I only have 1 page created. I've seen other posts in the forums about 2 occurences of home because it's hard coded, but I cannot see anything hard coded in this template. It must be buried in the php somewhere, but I cannot understand it as I am a newbie php and css person and sure could use some help.

    Thanks,
    leslie555

  2. leslie555
    Member
    Posted 5 years ago #

    Oh yes, here's the blog I'm working on: http://site.naturalkidz.com/blog/

    Other strangeness is that I edited the right sidebar title from "Blogroll" to "Links" but it's not sticking either.

    leslie555

  3. t31os
    Member
    Posted 5 years ago #

    Links shows as Links on my screen.

    Regarding the about links, can you post the code after <div id="navigation"> from your header.php please..

    Just what comes after the form.

  4. leslie555
    Member
    Posted 5 years ago #

    Thank you for responding! Yes, the "links" was a caching issue on my machine. But here's the code you asked for:

      <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*/}

      else {
      (is_page($page_id))?$selected = ' class="selected"':$selected='';
      echo "<li".$selected.">$page_title\n";
      }
      }
      }
      ?>

  5. t31os
    Member
    Posted 5 years ago #

    I think it's something to do with this function, i'm just having a look at the theme files now...

    BX_get_pages

    Will post back in a mo..

  6. t31os
    Member
    Posted 5 years ago #

    From taking a look at the function, i think it's a case of it picking up posts/pages with the wrong status... it doesn't look like it will do a good job of filtering out the correct pages...

    If you want to list pages, the above

      list can be replaced with something like...

      <ul>
      <li<?php if(is_home()) print' class="current_page_item"';?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
      <?php wp_list_pages('sort_column=menu_order&amp;hierarchical=0&amp;title_li='); ?>
      </ul>

      Then find this in style.css

      #navigation .selected,

      Change that to...

      #navigation .current_page_item,

    NOTE: Remove the amp; part showing next to the AND symbol, (forum bug).

  7. leslie555
    Member
    Posted 5 years ago #

    Oh cool! I have to run to a meeting, but I will try this as soon as I can. Thank you so much for your help! I wanted to add other items to the nav bar anyhow and I think your way will allow me to do that more easily. Out of curiosity, are you seeing a broken image under my RSS links area? I'm having an awful time of cached pages for some reason even after clearning my cache.

    Thanks again!
    leslie555

  8. leslie555
    Member
    Posted 5 years ago #

    Thank you so much t31os for the great help! I changed the code as you suggested and it did a couple of quirky things, like it changed it on the sub pages and the home took a long time to recognize the changes. I went in and changed the title of the about page to "About Us" and then it finally worked on the homepage. It would seem that this template may be a bit quirky! Is there a template you recommend that is more stable that I can style like the one I have now?

    Thanks again for the help!

    leslie555

  9. t31os
    Member
    Posted 5 years ago #

    Can't say i know any that look like that, i can only suggest you do what i do, try them and see... :)

Topic Closed

This topic has been closed to new replies.

About this Topic