WordPress.org

Support

Support » How-To and Troubleshooting » Display random list of pages from parent

Display random list of pages from parent

  • I am kind of perplexed as to how to accomplish this so please send me in the right direction or something.

    What I want to do, eventually:

    On the homepage, display 4 images that the featured thumbnail of pages that are randomly chosen from the same parent page.

    I have a parent page, “Sponsors” that has 100+ subpages (the actual sponsors). Every one of them has a featured image and I never add a page to that without a featured image so that is not a worry…

    I have, a few times, figured out how to display one of the pages or all of the pages but not a random 4. Or a random couple of pages but not the appropriate child pages…

    <?php wp_list_pages('child_of=437&sort_column=post_title&title_li=') ?>

    This gives me the right child pages but just as a list.

    Help?

  • The topic ‘Display random list of pages from parent’ is closed to new replies.
Skip to toolbar