When making a new USER in the backend singed in as admin, wp_posts signed assigns the post_author of that of admin, I need it to be changed so I can have search results reflect that of the actual user.

I used this as a reference for posts

/* Include all users in post author dropdown*/
/* Mimics the default metabox http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/meta-boxes.php#L514 */
function wpse39084_custom_author_metabox_insdes() {
      global $user_ID;
      global $post;
      <label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label>

        wp_dropdown_users( array(
             'name' => 'post_author_override',
             'selected' => empty($post->ID) ? $user_ID : $post->post_author,
             'include_selected' => true
        ) );

Is there change the post_author ID when I click save instead of being an ID of 1?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.