WP Query problem
-
have a WP Query question. basically got a list of articles with a certain issue number custom field grissue.
the query is supposed to get the issue number the page is currently on for aguments sake “119” and list all of the 119 issues articles.. a bit like a contents page.
now i have added issue 120 its started to mix within the list of issue 119 totally ignoring the custom field.
$key = "grissue"; $grissue = get_post_meta($post->ID, $key, true); $query = new WP_Query( array ( 'post_type' => 'customposttypename','posts_per_page' => '-1', 'orderby' => 'menu_order', 'order' => 'ASC', 'meta_key' => 'grissue', 'meta_value' => $grissue ) );
if i put the issue number in like so
$grissue = "120";
above the query. it works fine… but removes the whole dynamic nature i was going for… dont know if my query is messed up or not but bit disheartened after all the work i put into this 🙁can anyone help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WP Query problem’ is closed to new replies.