Query using Custom field
-
Hi,
Could you help confirming the code for using a custom field in a Query?
My custom field is called Gender, it is a radio input with 2 options, Male, Female.I am passing the value $gender via URL.$gender = $_GET["gender"]; $args = array( 'post_type' => 'study', 'posts_per_page' => $postperpage, 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC', 'meta_key' => 'Gender', 'meta_value' => $gender, 'paged' => $paged );
Doesn’t seem to work…
https://www.ads-software.com/plugins/wck-custom-fields-and-custom-post-types-creator/
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Query using Custom field’ is closed to new replies.