Query posts and display all dates in repeater field in chronological order

I think I succeeded in making the array and sorting it by date (see var_dump) array(575) { [320]=> array(10) { [“Speeldatum”]=> string(19) “2015-01-30 12:00:00” [“Productienaam”]=> string(28) “THE DOG DAYS ARE OVER (2014)” [“Makernaam”]=> string(11) “Jan Martens” [“Locatienaam2”]=> string(10) “toneelhuis” [“Stadnaam”]=> string(9) “ANTWERPEN” [“Landnaam”]=> string(2) “BE” [“Festivalnaam”]=> string(18) “antwerpse kleppers” [“Onderdeelvandezegripeveningnaam”]=> string(38) “antwerpse kleppers / bourla … Read more

PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "

To change choices depending on what an user selected in another input/select, you need to use the WP AJAX API. In your functions.php, use wp_localize_script() to get AJAX url available on front-end and define an AJAX action callback function mytheme_custom_scripts() { if ( is_page(‘Support’) ) { $scriptSrc = get_stylesheet_directory_uri() . ‘/js/freshdeskdata.js’; wp_enqueue_script( ‘myhandle’, $scriptSrc , … Read more

wp_update_post to set post IDs to drafts not working

Well in your for loop, I think you’re missing the $postcount variable… also there’s a typo at $idss[$i] …. should be $ids[i] based on what you’ve shown. for ($i = 0; $i < $postcount; $i++) { wp_update_post(array(‘ID’ => $ids[$i], ‘post_status’ => ‘draft’)); } That being said I’d just go with a foreach loop. The mistake … Read more

Orderby post__in Not Working Correctly?

If you look at the source of the Ajax Load More plugin, you can see a number of filters you can use to modify the query. You’ll likely want to use the alm_modify_query_args filter like so: $in_array = [ 115, 123, 66, 64 ]; add_filter( ‘alm_modify_query_args’, function( $args ) use ( $in_array ) { $args[ … Read more