Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Drop Down Child Pages.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26453
    Krylo
    Member

    Hi,

    I’m using this code to display a dropdown menu of child pages

    Code:
    Code:
    $select = wp_dropdown_pages(‘sort_column=menu_order&show_option_none=Select a Topic’);

    will put the words: ‘Select a Topic’ at the top of of the list…

    but I can’t seem to be able to incorporate that bit in my original code..

    can someone help me with the syntax?

    **Edit I’m doing this in wordpress btw

    #65728
    Krylo
    Member

    well, I figured it out by taking a different approach… (I had help lol cause I’m still so new at php).

    Code:
    post_parent)
    $select = wp_dropdown_pages(“sort_column=menu_order&selected=”.$post->ID.”&title_li=&child_of=”.$post->post_parent.”&echo=0″);
    else
    $select = wp_dropdown_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);

    $replacer = ““;
    $replacer = $replacer.”

    $select = preg_replace(“#]*)>#”, $replacer, $select);
    echo $select;

    ?>

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.