I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php

Driss, I tend to break up css and javascript that’s specific to a template into files specifically for that template – that way if it’s not needed on every page, I’m not loading it and thus that allows me to keep my main.js and style.css smaller. Here’s how I normally do it: if( is_page_template( ‘room.php’ … Read more

Grab posts by multiple categories

You should be able to use this: if (isset($meta_field[‘category’])) { // Get all post data for that category $post_data = get_posts_by_category($meta_field[‘category’], 0, $post_limit); } else { $args = array( ‘numberposts’ => $post_limit, ‘offset’=> 1, ‘category’ => ‘9,3’, ); $post_data = get_posts($args); }

Call a PHP Function with Multiple Parameters that is outside the AJAX Handler

Sorry for late reply. First allow POSTing from your WordPress to your game server (using Apache or PHP or whatever method). Then on your AJAX handler function, use wp_remote_post to POST your data to the Game Server. $request = wp_remote_post( ‘https://urltoyour/gameserver/voting/endpoint’, array( ‘body’ => $body, // array/json formatted voting data ) ); $response = wp_remote_retrieve_body( … Read more