Using Form to alter PHP variable [closed]
Don’t put your variables in single quotes. This: if(isset($submit)){ $args = array( ‘numberposts’ => 10, ‘meta_key’ => ‘$filter’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘DESC’, ‘post_type’ => ‘things’, ‘post_status’ => ‘publish’ ); $mystuff = get_posts( $args ); $name = $filter ; } Should be this: if(isset($submit)){ $args = array( ‘numberposts’ => 10, ‘meta_key’ => $filter, ‘orderby’ … Read more