Support

Account

Home Forums General Issues How to show older field from same category Reply To: How to show older field from same category

  • The best I can do here would be pseudo code. This forum is really for helping with questions about ACF and what you need is help with basic WP queries and loops. It would be large project for me to code everything that you need here.

    
    // this would be the main loop in your template
    while(have_posts)) {
      the_post();
      // show the fields for this post
      /*
            get the category of this post - wp_get_post_terms()
            get the date of this post - get_the_date()
            do a WP_Query to get the next older post in same category
            new WP_Query() with tax and date queries to get one post
            Nested post loop to loop over secondary query and show fields
      */
      
    }