Get post_author email for Zapier Integration

There’s no direct way of getting the post author’s email from a post. You can get the email by using the author ID, which is present in standard WP_Post object. $post_author_id = intval( $post->post_author ); $post_author_email = get_the_author_meta(’email’, $post_author_id); Or if you just have the post ID $post_author_id = intval( get_post_field( ‘post_author’, $post_id ) ); … Read more

Why isn’t comment validation working?

Add code in your theme function.php file function comment_validation_init() { if(is_single() && comments_open() ) { ?> jQuery(document).ready(function($) { $(‘#commentform’).validate({ rules: { author: { required: true, minlength: 2 }, email: { required: true, email: true }, comment: { required: true, minlength: 20 } }, messages: { author: “Please fill the required field”, email: “Please enter a … Read more

How set a while with a function

a. from the return function dosome(){ return true; } OR function dosome( param = true ){ return param; } var = dosome(); while ( var ){ need(); } b. while loop from fixed param TRUE function need( $param = true) { while ( param ){ $updates = get_point(); echo $updates[‘selector’]; echo ‘done’; } } need(); … Read more