Home>
Nice to meet you.
I use wp-members with Wordpress to manage users.
When there is information that I want to be displayed only to a specific user among the logged-in users,
As shown below, the user IDs 1, 2, and 3 are set, but only 1 is displayed.
Is the ID specification method incorrect?
global $current_user;
get_currentuserinfo ();
if ($current_user->ID == "1,2,3") {
echo ' test ';
}
-
Answer # 1
Related articles
- php - [wordpress] i want to display the "new mark" in the navigation when there is a new article
- php - in wordpress 1 i want to display only fixed pages and 2 search results excluding specific categories
- php - "display option" is not displayed in the post list on the wordpress administration screen
- php - i want to display the contents of a custom wordpress post with javascript on an html page
- php - have users post blogs with wordpress
- php - i want to display an eye-catching image in wordpress
- php - tweet display of users who are following with users who are logged in by joining laravel tables
- php - i want to display the category name (there may be more than one) and the tag (one) in wordpress popular posts without a li
- php - [wordpress] i want to display a specific article belonging to a specific term
- php - how to display the full text of wordpress rss feed without images
- php - i want to display a fixed page on the front page of wordpress
- php - wordpress i can't display the sitemap with my own theme
- php - wordpress pagination does not switch display after the second page
- php - display data only for currently logged in users
- php - [wordpress] how to display a list of articles of another custom post type on a single page of custom post type
- php - i want to display checkbox items for custom fields
- display images side by side in php
- php - [wordpress] about jquery errors
- i want to display the latest articles with featured images on the wordpress/post list page
- php - when displaying a list of articles in wordpress, i want to change the output content for each category
Related questions
- php : How to pass the value of a variable to another file
- php - add_rewrite_rule does not work
- php - how to run a program from outside the theme with wordpress
- is it possible to put php code in {} in an if statement?
- php - wordpress downgrade fails with fatal error and site not displayed
- php - i want to assign the value of a custom field template to the permission branch
- php - about wordpress and javascript jquery
- php - i want the custom taxonomy slug to be the same as the custom post type
- php - how to exclude apostrophes with $wpdb-> prepare ()
- php - i want to display the category name (there may be more than one) and the tag (one) in wordpress popular posts without a li
How about it?
If $current_user->ID type is fixed, strict comparison is better
For example