Skip to content

Instantly share code, notes, and snippets.

@marushu
Created February 1, 2019 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marushu/dfa1d2ac021128640df92e141771a076 to your computer and use it in GitHub Desktop.
Save marushu/dfa1d2ac021128640df92e141771a076 to your computer and use it in GitHub Desktop.
check data only me.
<?php
global $current_user;
$user_info_obj = wp_get_current_user();
//var_dump( $user_info_obj );
//var_dump( $user_info_obj->data->user_login );
$spesific_user = $user_info_obj->data->user_login;
if ( is_user_logged_in() && $spesific_user === 'xxxxx' ) {
var_dump($wp_query->found_posts);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment