The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Loop in a loop noob (1 post)

  1. rakemyleaves
    Posted 5 years ago #

    I created a custom post type called 'profentia'. In this custom post type I created custom fields to hold data. I want each single 'profentia' post to display its data as well as the previous 4 post's data. Currently, all posts display the 5 most recent days of data. How do I tell my new loop to start with the current post and go backwards? Let me know if more info is needed. Thanks in advance :)

    This is the code I am using for my second loop:

    $my_query = new WP_Query('post_type=profentia', 'showposts=5');
    if ( $my_query->have_posts() ) {
    while ( $my_query->have_posts() ) {
    <div class="inline-list-data"><?php the_meta(); ?></div><?php

Topic Closed

This topic has been closed to new replies.

About this Topic