Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Oh dear!!!

    I’ve looked for this for so long, thanks a lot. I’ve even tried to understand how WordPress’ Walker class generates its menus ids, but I just got as far as seeing that each $item has a weird ‘db_id’ property — something which I couldn’t understand, all I got of it was that it, further down, translates (is used) as $element->ID, which is really confusing since one might think that is the same as $post->ID, while it isn’t! This is really confusing when trying to get the current item’s (page, post, etc) CSS class or id’s current-menu-id since it does not match the current item’s proper ->ID variable…

    Some of the things I searched for before finally getting here:
    menu id number
    menuid number
    menu-item id number
    menu-item id walker corresponding number
    menu-item walker corresponding number
    menu-item corresponding number
    menu item corresponding number
    menu item number
    display_element
    walk
    nav-menu
    nav-menu-template
    start_el
    current-menu-item
    current-menu-item-id
    current-menu-item-id-number

    Maybe these will help people searching on Google and whatnot.

    Cheers!

    try using “title” instead of “name”.
    so for example, Brad, your code would become:

    $myposts = get_posts('post_parent='.$pageID.'&numberposts=-1&post_type=page&orderby=title&order=ASC');

    it seems to work for me.

Viewing 2 replies - 1 through 2 (of 2 total)