Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am a compete beginner with Advanced Custom Fields. I would like to get your help in understanding acf well, most probably a simple question.

I have a blog I use acf to categorize the posts. I use radio buttons to chose the category and the wordpress default WYSIWYG editor for the content. For example, the post categories are: sub categories are indexed:

Post type: article

field name : post_categories

Type : Radio Button



Type: Text SubHeading Type: Image Post Image

Please help me get to know how to,
1. Get Latest 3 articles from each Category.
2. In the latest 3 categories, how to include a text that looks like, 'posted in (subcategory) under (category)'.
3. How to include the subheading ?? can i just use 'the_field('SubHeading');' ???
can use any text case. much thanks from the bottom of my heart for the help.

my code is as follows

// args
$args = array(
    'numberposts' => -1,
    'post_type' => 'article',
    'meta_query' => array(
    'relation' => 'OR',
    'key' => 'internet',
    'value' => 'CSS',
    'compare' => 'LIKE'
   'key' => 'programming',
   'value' => 'ObjectiveC',
   'compare' => 'LIKE'
// get results
$the_query = new WP_Query( $args );
// The Loop
<?php if( $the_query->have_posts() ): ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
     <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query();  // Restore global post data stomped by the_post(). ?>

thank you!

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.