Fixed: Load Content Based on User (1 post)

  1. Basilakis
    Posted 8 years ago #

    global $user_ID;
             global $userdata;
    if (is_user_logged_in()){
               echo "Welcome, $userdata->user_login!";
             else {
               echo "Welcome, visitor!";

    I made this code, so i can load user Based content. The one in the codex was not working alone (i maybe did something worng) so i combined that to make what i needed. I am also loading the userdata so u can print, any variable from user profile u want.

    Hope it helps some ppl :D

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 8 years ago by Basilakis
  • This topic is not a support question
  • WordPress version: 2.5.1


No tags yet.