Yay! That helped!
Thanks so much @pfefferle!
Thanks again @pfefferle May I ask the ‘how’ to put that into an if statement before running the
wp_mail( $dest, "New post pending review: {$title}", $body );
I guess I have to only run a wp_mail if $post->post_type and using this https://developer.ww.wp.xz.cn/themes/basics/post-types/ I’m guessing I only have to call the wp_mail on post_type = post? Or make it specifically != ‘ap_post’?
Hi @pfefferle and thanks for the quick reply. Ah, I see now I wrote 5.7.3 in my subject but it’s 4.7.3 so then you might be on to something.
The function is function send_emails_on_new_event($post) and I would suspect that’s a public one. Or am I in the wrong place here? I don’t remember defining any custom post types, unless by that you mean categories?