Forums

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

Home Forums Back End List all child pages….

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31666
    sir_tisma
    Member

    Hello!

    Let’s say I have 3 big categories (pages with custom template): Cat 1, Cat 2 and Cat 3.
    I want to display all the child pages (newer first) from each category.

    Here is what I want to do http://www.shopmobil.ro/aparate-masaj-fitness.

    I found here something, but it’s not usefull: http://codex.wordpress.org/Function_Reference/wp_list_pages#List_whole_subpages

    The product titles (Product1,2,3…etc) had to be pulled out dynamic, the same for the picture.

    I followed Chris tutorial Lynda.com – WordPress 3.0 Creating and Editing Custom Themes, but I didn’t figure out.
    In that tutorial, he explained the situation if you had Cat1 -> Cat 1.1( child category of Cat 1) -> Product 1(child page of Cat 1.1).

    Thank’s,
    Cristian

    #59770
    jacorre
    Participant

    If I’m understanding what you’re requesting, I believe you’re looking to use the following:

    The above will list the subpages for the parent page of id 7. Change the number as needed.

    #59772
    sir_tisma
    Member

    thank’s, it’s working, but not in the way that I want.

    I want to display the pages like here http://www.shopmobil.ro/aparate-masaj-fitness
    not in an ul.

    this is the code

    ID, "categories", true);
    // example value = "Sprockets|92,Sprunklers|94"

    $allCategories = explode(",", $categoriesCF);
    // $allCategories[0] = "Sprockets|92"
    // $allCategories[1] = "Sprunklers|94"

    foreach ($allCategories as $category) {

    $pieces = explode("|", $category);
    // $pieces[0] = "Sprockets"
    // $pieces[1] = 92

    $link = get_permalink($pieces[1]);
    echo "

    ";
    echo "

    " . $pieces[0] . "

    ";

    query_posts("posts_per_page=-1&post_type=page&post_parent=$pieces[1]");

    while (have_posts()) : the_post(); ?>

    " class="product-jump" title="">

    ID, "product_regular", true) . "' />"; ?>

    ";

    };
    ?>

    #59741
    sir_tisma
    Member

    problem solved, thank you all!

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