Title: Query post by text field
Last modified: September 1, 2016

---

# Query post by text field

 *  [Dinhᵀᵛ](https://wordpress.org/support/users/dinhcode/)
 * (@dinhcode)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/query-post-by-text-field/)
 * Hello
 * I have add a field in post `dcvbpl_banhanh` and add value `Bộ thủy sản`
 * and have Query post by text field:
 *     ```
       <?php
       $args = array(
       	'numberposts'	=> 10,
       	'post_type' => 'post',
       	'meta_key'		=> 'dcvbpl_banhanh',
       	'meta_value'	=> 'Bộ thủy sản',
       );
       $the_query = new WP_Query( $args );
       ?>
       <?php if( $the_query->have_posts() ): ?>
       <div class="wapsdblist">
       	<h3><?php the_field('dcvbpl_banhanh'); ?></h3>
       	<ul>
       <?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
       		<li><i class="fa fa-check-circle-o"></i> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
       <?php endwhile; ?>
       	</ul>
       </div>
       <?php endif; ?>
       <?php wp_reset_query();	 // Restore global post data stomped by the_post(). ?>
       ```
   
 * But my code is not show list post true value.
 * Give me any idea. any support for help me.
    Thanks
 * [https://wordpress.org/plugins/advanced-custom-fields/](https://wordpress.org/plugins/advanced-custom-fields/)

The topic ‘Query post by text field’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Dinhᵀᵛ](https://wordpress.org/support/users/dinhcode/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/query-post-by-text-field/)
 * Status: not resolved