Checking array against author id in loop

You actually want author__in, and you can use the array. You shouldn’t implode it: $query = new WP_Query( array( ‘author__in’ => $friendsIdArray ) ); As far as where in the Loop this goes, I’m not sure I understand. This occurs before creating your a Loop, not in it.

how to make custom ajax handler?

You have to include WP core function files, something like this… <?php //mimic the actuall admin-ajax define(‘DOING_AJAX’, true); if (!isset( $_POST[‘action’])) die(‘-1’); //make sure you update this line //to the relative location of the wp-load.php require_once(‘../../../../../wp-load.php’); //Typical headers header(‘Content-Type: text/html’); send_nosniff_header(); //Disable caching header(‘Cache-Control: no-cache’); header(‘Pragma: no-cache’); You can read more about this here https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress … Read more

Some code in shortcode function being ignored

This line is your issue: $log_string += “Dealing with ” . count($atts) . ” tab(s)\n”; It should be: $log_string .= “Dealing with ” . count($atts) . ” tab(s)\n”; It looks like you confused the javascript and PHP concatenation operator. Don’t worry, it’s something I’ve done numerous times! Ugh! Edit: Actually, looks like you’ve made this … Read more

My new button is in the wrong place

I figured it out, it was a pretty simple oversight actually. I forgot the the number after the add or remove action represents priority and by putting the same priority I was messing things up. So i just removed the priority to the remove add to cart action. So my code now looks like this … Read more