Edit Post custom options not working

You need the $post_id passed in to the function you are calling from the hook. Try making your function declaration like this: function slider_data( $post_id )

Div Missing In Custom Loop Query

You have this code: elseif (17 < $count && $count <= 27 && $paged === 1) : if ($count === 10) echo ‘DIV/CONTENT BEFORE THE NEXT 10 POST GOES HERE’; The first conditional fails when 10 === $count and so the second conditional can never succeed. As your while loop executes (in a structure that … Read more

searching for members in wordpress

Probably this plugin is using user_meta table. Your query should looks like this: $args = array( ‘meta_key’ => $_searchedWhat, ‘meta_value’ => $_searchedFor ); $users = get_users($args); For more informations look into documentation: get_users EDIT: Unfortunately, that plugin is storing all data into one field, so you cannot query users by single field. You should use … Read more

Get featured image outside the loop using foreach

First you will need to get a list of all available sizes on your site. This function get_intermediate_image_sizes() will do that. You can then pass the results of that to image_get_intermediate_size() along with the post id and <?php $sizes = get_intermediate_image_sizes(); ?> <?php foreach($major_data as $postID) { ;?> <?php $postData = get_post( $postID );?> <?php … Read more

how to check if the post id has a new comment?

There is a WordPress hook comment_post to retrieve recently added comment and to pass comment id to get_comment you will get the post id. add_action( ‘comment_post’, ‘show_message_function’, 10, 2 ); function show_message_function( $comment_ID, $comment_approved ) { $comment_array = get_comment($comment_ID ); $comment_post_id = $comment_array->comment_post_ID; }