Forums

How to delete subpages (5 posts)

  1. objectnull
    Member
    Posted 4 years ago #

    Subpages categories keep popping up in my pages for no reason and I can't figure out how to delete them. See http://peggyparsons.com/?page_id=18 for what I'm talking about.

    I'm using WP-Andreas01 1.7 and WP 2.3

    Any and all help is appreciated. Thank you.

  2. objectnull
    Member
    Posted 4 years ago #

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

  3. moshu
    Member
    Posted 4 years ago #

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

    What are you talking about? Pages or categories?

  4. objectnull
    Member
    Posted 4 years ago #

    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.

  5. ShirouJune
    Member
    Posted 4 years ago #

    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 } } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic