Support » Fixing WordPress » Page titles automatically added to menu

Viewing 15 replies - 1 through 15 (of 27 total)
  • I think you have a pages plugin in your sidebar. Remove it and use the “blogroll”/”links” function and widget to link to the pages you want.

    Hi,

    One option is to can use a plugin (e.g. Page Lists Plus, or Exclude Pages) that lets you choose which Pages appear in your Page menus.

    – Tim

    Thread Starter ezgold

    (@ezgold)

    I’m afraid I wasn’t clear.

    The pages are added to my top menu, not the sidebar. How do I remove them and leave only the “home” button.

    Open your header.php and remove the arguments you don’t want. Alternally, Techno’s plugins will do the trick too.

    How do I remove them and leave only the “home” button.

    You would delete wp_list_pages code in your header.php in main navigation

    Edit- if your home link was deleted along with that, then add
    <li><a href="<?php echo get_option('home'); ?>/">Home</a></li>

    Thread Starter ezgold

    (@ezgold)

    mercime,
    I didn’t have “wp_list_pages” code in my header.php
    I did have
    <ul class=”artmenu”>
    <?php art_menu_items(); ?>

    <div class=”l”></div>
    and when I changed the <?php art_menu_items(); ?> with the code you mentioned, the top menu wasn’t what I hoped for (you can take a look: http://searchbyssn.org)

    Gangleri,

    I’m not sure what “arguments” are, but this is how my header.php looks now:
    <div class=”Main”>
    <div class=”Sheet”>
    <div class=”Sheet-tl”></div>
    <div class=”Sheet-tr”><div></div></div>
    <div class=”Sheet-bl”><div></div></div>
    <div class=”Sheet-br”><div></div></div>
    <div class=”Sheet-tc”><div></div></div>
    <div class=”Sheet-bc”><div></div></div>
    <div class=”Sheet-cl”><div></div></div>
    <div class=”Sheet-cr”><div></div></div>
    <div class=”Sheet-cc”></div>
    <div class=”Sheet-body”>
    <div class=”Header”>
    <div class=”Header-c”></div>
    <div class=”logo”>
    <h1 id=”name-text” class=”logo-name”>/”><?php bloginfo(‘name’); ?></h1>
    <div id=”slogan-text” class=”logo-text”><?php bloginfo(‘description’); ?></div>
    </div>

    </div>
    <div class=”nav”>
    <ul class=”artmenu”>

    • /”>Home
    • <div class=”l”></div>
      <div class=”r”><div></div></div>

    Hm, these theme developers make things more and more complex. Yours used the function.php for the list_pages (function art_list_pages_filter($output)) which seems to be called by this in your header.php: elseif (is_page() ), but I am not sure about that! Mercime?
    Did you already try the two plugins that Technokinetics mentioned?

    Thread Starter ezgold

    (@ezgold)

    I did try them and they didn’t work on the top menu.

    That’s weird, since the plugins claim to handle the list_pages, not specifically a widget. Maybe you can look a bit further for similar plugins and/or contact your theme author for tips.

    Thread Starter ezgold

    (@ezgold)

    these plugins only handle the sidebar list_pages. I think there is a different function to put the pages in the top menu.

    In your theme it’s different from what I’m used to indeed….

    The plugins modify WP’s native wp_list_pages() function, which in most cases should be used to generate Page lists. If a theme uses its own custom functions instead of native WP functions, then users shouldn’t expect plugins to work with it.

    Why do so many developers use custom functions when there are native functions that will do?

    – Tim

    Thread Starter ezgold

    (@ezgold)

    If I will post here the functions.php will you be able to find the source of this issue?

    @gangleri, @technokinetics – personally, I have changed “premium” WP themes with all the propriety functions to regular themes for clients with the same functionality. Kept in attribution link to theme developer’s site … after all, CSS and images are theirs 🙂 I believe many theme developers use custom functions so that they can retain GPL status while being able to charge for support in order to make a living by creating killer themes 🙂 Can’t blame themers though, I’ve noticed great themes being distributed by those wordpress theme sites which change attributions and even add obfuscated code at the footer.php or functions.php or header.php – okay, i feel better after that rant 🙂

    ezgold – you are not limited to the functions given in your theme. You can still do the main navigation as we started out. It’s simplified like this:

    <div class="nav">
       <ul class="artmenu">
       <li><a href="http://searchbyssn.org/">Home</a></li>
       <?php wp_list_pages('title_li='); ?>
       </ul>
       <div class="l"></div>
       <div class="r"><div>
    </div>

    – don’t know what that div class l or r are for or why they’re there 🙂

    Then do either of these ways to control your main navigation:

    1) Plugin way – http://wordpress.org/extend/plugins/exclude-pages/
    With exclude pages plugin, there’s an option to exclude that page in your Pages > Add New – Panel from your main horizontal navigation. So even if you change your theme, the excluded pages won’t be appearing in your new theme’s main navigation as well.

    2) <?php wp_list_pages('title_li='); ?> – without using any plugin, you can exclude the page from your main navigation by excluding pages via Page ID e.g.
    <?php wp_list_pages('title_li=&exclude=3,6,100,200'); ?>
    In this case, if you change your theme, copy your main nav links to your new theme.

    3) Hardcode all the main navigation links. If you have only five main links, easy way to go.

    <div class="nav">
       <ul class="artmenu">
       <li><a href="http://searchbyssn.org/">Home</a></li>
       <li><a href="http://searchbyssn.org/about/">About</a></li>
       <li><a href="http://searchbyssn.org/terms-of-service/">Terms Of Service</a></li>
       <li><a href="http://searchbyssn.org/privacy">Privacy</a></li>
       <li><a href="http://searchbyssn.org/contact/">Contact</a></li>
       </ul>
       <div class="l"></div>
       <div class="r"><div>
    </div>

    In this case, if you change your theme, copy your main nav links to your new theme.

    Thread Starter ezgold

    (@ezgold)

    Were you off during the weekend?

    Anyone have an idea?

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Page titles automatically added to menu’ is closed to new replies.