• Resolved samuelclarke

    (@samuelclarke)


    Have just upgraded to WordPress 2.1 and really excited about the simple static home page feature – I was just about to delve into the code to set up a static home page for a client, and this update came just at the right time! ??

    Anyway, I’ve got the front page set to a page called “home” (static page) and the loop set to a page called “news”. Everything is fine except for the fact that there are two “home” links in the menu (they both go to the same page) – what’s the story and how can I fix it so that there is only one “home” in the menu bar?

    Thanks in advance for the help! I’m starting to understand a little PHP code, but I’ve been a print designer and while my CSS and HTLM are almost passable, my PHP isn’t!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi!
    Check your theme’s header.php. It could be the “Home” link is hardcoded there.

    You could also set your “home” page’s title to nothing…uhmm null, zilch, you know, blank.
    All the best,
    T

    Thread Starter samuelclarke

    (@samuelclarke)

    Thanks for that! After looking in the header.php file I found that it wasn’t a variable (i.e. was hardcoded)

    My PHP skills are still getting there – I had a look in there but at first glance didn’t see anything amiss…but hey, I’ve learned something new – so thanks! ??

    Thread Starter samuelclarke

    (@samuelclarke)

    Thanks for that! After looking in the header.php file I found that it wasn’t a variable (i.e. was hardcoded)

    My PHP skills are still getting there – I had a look in there but at first glance didn’t see anything amiss…but hey, I’ve learned something new – so thanks! ??

    I am having the same problem. But I still don’t understand what to do. Here is some code in my header.php file. Let me know what I should change.

    <h1><a href=\\"<?php echo get_settings('home'); ?>\\"><?php bloginfo('name'); ?></a></h1>
    
    <h2><?php bloginfo('description'); ?></h2>
    
    </div>
    
    <?php if (is_page()) { $highlight = \\"\\"; } else {$highlight = \\"current\\"; } ?>
    
    <div id=\\"mainmenu\\">
    <ul class=\\"level1\\">
    <li class=\\"<?php echo $highlight; ?>\\"><a href=\\"<?php echo get_settings('home'); ?>\\"><?php _e('Home','andreas09'); ?></a></li>
    <?php
        if(function_exists(\\"wp_andreas09_nav\\")) {
          wp_andreas09_nav(\\"sort_column=menu_order&list_tag=0&show_all_parents=1&show_root=1\\");
        }
    ?>
    </div>

    Thanks

    You’ve probably found it by now, but it’s probably the word “Home” and the single quotes around it that has to go because you have a page called “Home” too.

    <li class=\\”<?php echo $highlight; ?>\\”>\\”><?php _e(‘Home’,’andreas09′); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Two home pages in WP 2.1’ is closed to new replies.