Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter objectnull

    (@objectnull)

    I hate to bump this but I still have found no help on the subject.

    Maybe there are no answers because of this nonsense phrase:
    Subpages categories

    What are you talking about? Pages or categories?

    Thread Starter objectnull

    (@objectnull)

    Sorry about that, I just meant Subpages, I don’t know why I typed “categories”.

    If you go to the link in my first post there is a box in the top right corner of the page that says Subpages for Books: but there’s nothing underneath it. I assumed it would be something simple, such as a check-box that I could switch off in Manage > Page > Edit area.

    Hi! I found this nice code into one template around there, it will be useful for you because it will list all your supages inside a “PAGE category” (It’s ok, I understand what you talking about)

    Just paste this code inside the top right corner BOX template

    <?php /* Menu for subpages of current page */
    global $notfound;
    if (is_page() and ($notfound != ‘1’)) {
    $current_page = $post->ID;
    while($current_page) {
    $page_query = $wpdb->get_row(“SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = ‘$current_page'”);
    $current_page = $page_query->post_parent;
    }
    $parent_id = $page_query->ID;
    $parent_title = $page_query->post_title;

    if ($wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_parent = ‘$parent_id’ AND post_status != ‘attachment'”)) {
    ?>

    <div id=”pagemenu”>

      <?php wp_list_pages(‘sort_column=menu_order&title_li=&child_of=’. $parent_id); ?>

    <?php if ($parent_id != $post->ID) { ?>
    “><?php printf(__(‘Volver a %s’,”), $parent_title ) ?>
    <?php } ?>
    </div>

    <?php } } ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to delete subpages’ is closed to new replies.