WordPress.org

Ready to get started?Download WordPress

Forums

Check for Child Pages, list them with Iteration (1 post)

  1. rwilliams1961
    Member
    Posted 1 year ago #

    I'm creating a single testimonials page for a website with multiple product lines. (The site is for wedding rings.)

    There are 16 ring collections with 12 rings in each. On this page, I want to list the collection name followed by as many testimonials as there are for that collection. (The testimonials will be child pages listed under that collection name.) Each testimonial will be accompanied by a photograph of a ring from that collection. (Luckily, the ring images are numbered 1-12 and there will never be more than 12 testimonials for any one collection.)

    Example:

    Product A

    Image 1
    Testimonial 1

    Image 2
    Testimonial 2

    Product B

    Image 1
    Testimonial 1

    Etc.

    I have some code that lets me insert pages into pages:

    <?php
    pause_exclude_pages();
    show_mult_post('testimony');
    $content = apply_filters('the_content',$include[0]->post_content);
    resume_exclude_pages();
    ?>

    How do I check for child pages, and then list that child page/testimonial and an image for that testimonial?

    Your help is appreciated. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic