• Hi,

    I am using StudioPress theme for my blog I created a new About page, and in the settings, set the main page to go to a static page. The only option it gave me was my About page, so I set it to that, but now when I go to my site, a tab for Home appears, and both the Home tab and About tab go to an identical page.

    I would like my static page to be labeled Home, but that does not seem to be possible. There is no option under Pages to delete this preset home page and replace it. When I go to Pages, it only shows me the About page I created, yet there are two page tabs on the site.

    Has anyone else had this issue? Any ideas how to correct it?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The Home link is almost certainly hard coded into your navigation menu and you would need to edit the relevant template file to remove it. I can’t give you any more precise details without seeing your site.

    Thread Starter vlgee

    (@vlgee)

    Thanks Esmi, that’s what I was afraid of. I barely know how to make simple changes to my CSS stylesheet. I am a little nervous about tinkering with the PHP. My site is http://mylocaljobmarket.com

    Thanks for your help.

    Try editing header.php and looking for:

    <div id="nav">
    <ul>
    <li><a title="Home" href="<?php bloginfo('url');?>"><span>Home</span></a></li>
    <?php wp_list_pages('title_li=');?>
    </ul>

    and removing the line:

    <li><a title="Home" href="<?php bloginfo('url');?>"><span>Home</span></a></li>

    To keep the tab highlighting, edit style.css and try changing:

    #nav li a span {
    background:transparent url(images/bgtabright.gif) no-repeat right top;
    color:#FFFFFF;
    display:block;
    font-weight:bold;
    line-height:26px;
    margin-left:6px;
    padding-left:5px;
    padding-right:12px;
    text-decoration:none;
    }

    to:

    #nav li a span,#nav li .current_page a span {
    background:transparent url(images/bgtabright.gif) no-repeat right top;
    color:#FFFFFF;
    display:block;
    font-weight:bold;
    line-height:26px;
    margin-left:6px;
    padding-left:5px;
    padding-right:12px;
    text-decoration:none;
    }
    Thread Starter vlgee

    (@vlgee)

    Ok, thank you so much. I will try that!

    Thanks

    Thread Starter vlgee

    (@vlgee)

    I did not find a line like the one you posted. What it has is

    <div id="nav">
    <?php function get_the_pa_ges() {
      global $wpdb;
      if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) {
         $these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by ID');
    
       }
      return $these_pages;
     }
    
     function list_all_pages(){
    
    $all_pages = get_the_pa_ges ();
    foreach ($all_pages as $thats_all){
    $the_page_id = $thats_all->ID;
    
    if (is_page($the_page_id)) {
      $addclass = ' class="current_page"';
      } else {
      $addclass = '';
      }
    $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>';
    }
    
    return $output;
     }
    ?>
    <ul>
    <?php
    
    if (is_home()) {
      $addclass = ' class="current_page"';
      } else {
      $addclass = '';
      }
    echo "<li" . $addclass . "><a href='" . get_option('home') . "' title='Home'><span>Home</span></a></li>";
    echo list_all_pages();?>
    </ul>
    Thread Starter vlgee

    (@vlgee)

    Does anyone have any ideas on how to fix the duplicate page issue?

    Thanks

    I have the same problem!
    did ypu solve it??

    e

    Hi!

    I managed to remove the dublicated tab.
    I changed the header.php

    <?php
    if (is_home()) {
      $addclass = ' class="current_page"';
      } else {
      $addclass = '';
      }
    echo "<li" . $addclass . "><a href='" . get_option('home') . "' title='Home'><span>home</span></a></li>";
    echo list_all_pages();?>

    to:

    <?php wp_list_pages('title_li=&depth=1'); ?>

    But it changed the colour on the remaining buttons to blue.
    I havent been able to change them back to white just yet.

    Best Eivind

    Now I found the propper solution!!!!!:-)
    You should of course just delete the link….Im such a noob:-)

    Find this part of the header.php

    <?php
    if (is_home()) {
      $addclass = ' class="current_page"';
      } else {
      $addclass = '';
      }
    echo "<li" . $addclass . "><a href='" . get_option('home') . "' title='Home'><span>home</span></a></li>";
    echo list_all_pages();?>

    and delete the link:

    <a href='" . get_option('home') . "' title='Home'><span>home</span></a>

    YAY:-)

    That worked great for me!

    Your new code in header.php should look like this:

    <ul>
    <?php
    
    if (is_home()) {
      $addclass = ' class="current_page"';
      } else {
      $addclass = '';
      }
    echo "<li" . $addclass . "></li>"; //change 'Home'
    echo list_all_pages();?>
    </ul>

    I esmi’s instructions, it worked fine with me. Thanks for the replies. I didn’t even there’re a lot of options for this problem.

    Nate
    Credit Card

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘StudioPress Duplicate Tabs’ is closed to new replies.