• Trying to do a really simple thing in the ‘Fighter’ theme….add a link called ‘Home’ to the main menu.

    The main menu appears to be a list of pages called by the sidebar.php page thus:

    <php wp_list_pages(‘title_li=’); ?>

    The list of pages is called by the php tag – I added an ‘a href’ bit as a link to the home page just before this php call, as I wanted it to appear at the top of the list (I’m sorry, I can’t work out how to show code here…it keeps turning my code into actual links…and not showing the code!!). This php call and my added a href link were within ul tags, themselves within a div class id.

    My a href home link works, except that it is completely unstyled….despite being within the ul stylers of the css for the php call.

    I don’t want to have to create a new page in wordpress called ‘Home’ – this is just a link (a very logical one to have under main menu, don’t you think?) to the index page.

    Unfortunately, I cannot find anywhere else to insert this link. I can’t find wp_list_pages anywhere, I’ve even searched the database itself!!

    This must be simpler to do than this? I’m not asking for much….am I?

    I’m afraid these themes are sometimes way too complexicated in code and css structures that only a geek could understand….. ?? Surely something as important as a navigation menu should be more accessible to humble lay people?

    dj

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you give us the url to your page to see the problem?

    I am confused…the fighter theme does have a “Home” tab in the main menu, linking to the index page. This is not showing in your blog?

    It’s in header.php

    <div id="header">
    <div class="header-title"><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></div>
    <div class="header-description"><?php bloginfo('description'); ?></div>
    <ul class="nav">
    <li><a <?php if (is_home()) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>">home</a></li>
    <?php wp_list_pages('title_li='); ?>
    </ul>
    </div>
    Thread Starter davyjones

    (@davyjones)

    Hi budha,

    Can’t see any home tab anywhere….?

    https://www.fionawillis.com

    You can see the botched ‘home’ link in the main menu in the sidebar. Can’t style it.

    (not my site, I’m helping a friend out who’s a bit stuck)

    I see now, the original theme has the tabs in the header, which are gone in your friend’s site. And the sidebar doesn’t include it. So you want the main menu in the sidebar.

    I think that if you try duplicating the call for the home tab that was in the header, it should appear fine in the sidebar.

    Try this in sidebar.php

    <ul>
    <li><a <?php if (is_home()) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>">home</a></li>
    <?php wp_list_pages('title_li='); ?>
    </ul>

    It should work.

    Thread Starter davyjones

    (@davyjones)

    Thanks for that, buddha, I’ve forwarded it for them to try out – will let you know!

    cheers

    if you are using wordpress 2.7+, try changing

    <?php wp_list_pages(‘title_li=’); ?>

    to

    <?php wp_page_menu(‘show_home=1&title_li=’); ?>

    It worked great for me and it uses the same style classes as wp_list_pages().

    -Pete

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fighter theme – adding link to ‘main menu’’ is closed to new replies.