Title: Multiple custom fields and values (query)
Last modified: August 30, 2016

---

# Multiple custom fields and values (query)

 *  [dieuduciel](https://wordpress.org/support/users/dieuduciel/)
 * (@dieuduciel)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/multiple-custom-fields-and-values-query/)
 * Hello all,
 * Is it possible with this module to list posts that have 2 custom names and values.
   
   Example : I want to list posts that have the custom field name “lib_nature” with
   the value $lib_nature and also have the custom field name nom_reg with the value
   $nom_reg
 * I tried this but it does not work :
 * <?php echo do_shortcode(“[catlist categorypage=’yes’ customfield_name=’lib_nature’
   customfield_value=’$lib_nature’ customfield_name=’nom_reg’ customfield_value=’
   $nom_reg’]”); ?>
 * This code with only one field name and value works however.
 * Maybe my syntaxe is wrong or the plugin is not compatible ?
 * Thanks for your help.
 * best regards.
 * [https://wordpress.org/plugins/list-category-posts/](https://wordpress.org/plugins/list-category-posts/)

Viewing 1 replies (of 1 total)

 *  [Borjan Tchakaloff](https://wordpress.org/support/users/b1bz/)
 * (@b1bz)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-custom-fields-and-values-query/#post-6200966)
 * Hello (salut),
 * each attribute must be unique, WordPress does not handle several occurrences 
   of an attribute.
    So no, this feature is not (yet?) available with this plugin.
   But you can participate and improve the plugin yourself too! See [the author’s repository](https://github.com/picandocodigo/List-Category-Posts#development)
   for more information.

Viewing 1 replies (of 1 total)

The topic ‘Multiple custom fields and values (query)’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Borjan Tchakaloff](https://wordpress.org/support/users/b1bz/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/multiple-custom-fields-and-values-query/#post-6200966)
 * Status: not resolved