Accessing Advanced Custom Fields with Repeater using jQuery instead of PHP

Assuming you registered or enqueued your jQuery script using wp_enqueue_scripts and assigned it a proper handle, this function will allow you access to the postage_prices fields in jQuery via a variable postagePricesArray.prices. You need to replace %YOUR_SCRIPT_HANDLE% with your jQuery script’s actual handle or this variable may not become accessible. function localize_postage_prices() { global $post; … Read more

Custom post order returning posts from other categories

In WP_Query(), there is no category reference passed so this is the point which returns all category post. Please try with passing category ID here: $the_query = new WP_Query(array( ‘cat’=4, //Your category ID ‘posts_per_page’ => -1, ‘meta_key’ => ‘adult_price’, ‘orderby’=> ‘meta_value_num’, ‘order’ => ‘ASC’ )); OR $the_query = new WP_Query(array( ‘category_name’=staff, //Your category name… ‘posts_per_page’ … Read more