Grow your CSS skills. Land your dream job.

Is this possible to do in WordPress???

  • # June 8, 2009 at 2:06 am

    Does anyone know if it’s possible to create 2 separate menu areas?

    What I need is a main menu to appear horizontally across the top, this would lead to the main navigation links (Home, Contact, etc). These links can be dynamic or not, but they just need to be editable.

    Additionally, I need to create an area on the page where it displays pages dynamically because pages will be created and removed often, and each page needs it’s own password. Because there will be like 10-15 pages like this at any given time, it makes using a sub-menu pretty bulky.

    One thought I had was that possibly I can include a small box on the page that is pulling in the sub menu into it while the main menu hides the sub menu items?

    Maybe I’m over complicating it and can use Posts included on one of the pages to this affect… Just seeing what can be done before I get too deep into it.

    # June 8, 2009 at 2:49 am
    "xheathen" wrote:
    Is this possible to do in WordPress???

    ANYTHING IS POSSIBLE!!! MUAHAHAH!!!

    But seriously:

    Yes, that’s simple: wp_list_pages()

    You can use that function to list pages in any spot in your theme.

    Example:
    You could put this code in the header to display only the three main pages (with ID of 5, 9 and 23):

    Code:
      < ?php wp_list_pages('include=5,9,23&title_li='); ?>

    Then you could put this in the sidebar to list all active pages:

    Code:
      < ?php wp_list_pages('title_li=All Pages'); ?>
    Rob
    # June 8, 2009 at 5:29 am
    "AshtonSanders" wrote:
    "xheathen" wrote:
    Is this possible to do in WordPress???

    ANYTHING IS POSSIBLE!!! MUAHAHAH!!!

    No truer word spoken. WordPress is as flexible as a contortionist who can squeese through a mailbox.

    # June 8, 2009 at 6:34 pm

    Excellent – that is very cool!

    I do have one question, and please forgive my apparent lack of WordPress savvy, but if I include say only id 5 within the page, will it display all the sub pages that are under that id as well?

    thanks for all the help so far!

    # June 8, 2009 at 7:21 pm

    No it won’t. If you want to list the child pages you can specify child_of=5. If you want to have both the page and all its children you can use the following snippet:

    Code:
    < ?php
    $pageid = 5; // id of the page
    $child_pages = wp_list_pages("title_li=&echo=0&child_of=$pageid") ;

    echo "

      “;
      wp_list_pages(“title_li=&link_after=
        $child_pages

      &include=$pageid”);
      echo ““;
      ?>

    # June 10, 2009 at 5:51 pm

    Wordpress is well documented. It took me some googling but this is where I really started to understand what was possibly as far as wordpress template tags go.

    http://codex.wordpress.org/Template_Tags

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".