Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

dropdowns where fist level is not linked to a page

  1. This is not a support question for Hybrid, but maybe someone here has an idea:
    on this site :http://sideradesign.com/krf, I want the top level menu items to not link to pages, because they have no content. is ther a way to strip the anchor tags?

  2. You must be a logged-in exclusive member to view this reply.

  3. thanks Justin.
    I thought about the custom menu, but then each time the client wants to add a page, I'd have to update the menu
    I'll look into the regex thing

  4. If anyone is interested, I custom coded it:

    <ul>
    <?php
    $top_level_pages = get_pages('parent=0&sort_order=desc');
      foreach($top_level_pages as $page){
        //print_r($top_level_pages);
        $id = $page->ID;
        $children = wp_list_pages('echo=0&child_of='.$id.'&sort_column=post_date&sort_order=desc&title_li=');
        if($children) {
          print '<li>'.$page->post_title;
          print '<ul>';
         print $children;
         print '</ul></li>';
      }
    else {
      print '<li><a href="'.get_page_link($page->ID).'">'.$page->post_title.'</a></li>';
    }
    }
    ?>
    </ul>

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Bliss Theme (253 posts)
  • Hybrid Theme (21,735 posts)
  • Options Theme (10,356 posts)
  • Structure Theme (2,747 posts)
  • Outline Theme (36 posts)
  • Visionary Theme (767 posts)
  • bbPress Themes (305 posts)
  • WordPress Plugins (2,045 posts)
  • General Discussion (5,276 posts)