Marubucin WordPress: Addara Shirya Fayil ɗin Fayil idan aka Shiga ciki

wordpress logo

Ina so in sabunta shafin yanar gizo na WordPress kuma in kara bangaren 'Game da Marubucin' a karkashin kowane sako. Ya kasance mafi wuya fiye da yadda nake tsammani - kuma a zahiri yana buƙatar ƙarin shirye-shirye, amma ga farkon yanke:

Mawallafin: Yanar Gizo: Game da:

Na gaba, Na duba don ganin ko da gaske wani ya shiga kuma ya nuna hanyar Shirya Bayanan martaba don haka mutum zai iya dannawa da sabunta bayanan su (Na sabunta wannan sakon… babban bayani da tambaya daga Ajay!):

">Shirya Profile

Na kara da aji = ”marubuci” ga zanen salon don yayi kyau sosai.

Ina so in tsabtace lambar don kada in nuna adireshi ko bayani idan babu; Koyaya, Ina tsammanin zan rubuta ainihin tambayoyin zuwa bayanan don wannan. Lura da hanyar "Shirya Profile"… an nade shi da wani bayani idan zai bayyana shi ne kawai idan mai amfani ya shiga. Ina tsammanin yana da kyau, don haka ina so in raba muku idan kuna son amfani da shi!

11 Comments

  1. 1
  2. 2

    Barka dai Ajay!

    Ba na son nuna hanyar Shirya Profile sai dai idan wani ya shiga ciki da gaske. Don haka aikin get_currentuserinfo () zai dawo da bayanan mai amfani kuma idan bayanin ya tabbatar idan mai amfani na yanzu yana da mai amfani_id… yana da hanyar dubawa ko a'a suna ciki.

    Watau - idan kun shiga, kun ga hanyar haɗi don shirya bayanin martaba. Idan ba ku ba, ba ku ga mahaɗin ba.

    Doug

  3. 3
  4. 4
  5. 5
  6. 6

    Sannu Doug,
    kawai kuna mamakin shin kun san yadda zan iya amfani da wannan ya dogara da mai amfani wanda ya shiga?
    Don haka idan mai amfani ya shiga JohnSmith zai nuna 'A' kuma idan mai amfani ya shiga BillBob zai nuna 'B'?

    Thanks!

    • 7

      Hi Mike,

      Ina da tabbacin cewa mai canza $ user_id zai dawo da ainihin ID na Mai amfani a cikin sashin Masu amfani a cikin gudanarwa. Don haka kuna iya gina bayanin bayanin shari'ar idan dabaru….

      if ($user_id=="1") { echo "Doug"; }

      Ban gwada wannan ba amma na tabbata cewa dole ne ku sanya shi a cikin yanayin aikin get_currentuserinfo.

      Doug

  7. 8
  8. 10

    Sannu Doug. Godiya ga rabawa. Abin takaici, wannan lambar ba ta yi aiki a gare ni ba:

    Shirya
    Profile

    Na yi amfani da lambar da ke ƙasa a maimakon. Lokacin da mai amfani ya shiga, "My Profile" zai nuna. Lokacin da babu wani mai amfani da ya shiga, "Createirƙiri Asusun" ya bayyana.

    <? php idan (shine_user_logged_in ()) {
    samu_currentuserinfo ();
    amsa kuwwa ('My Profile');
    }
    wasu {
    amsa kuwwa ('Haifar da wani Asusun');
    };
    ?>

    Kawai son yin tarayya idan wani yana buƙatarsa. Da fatan za a cire sarari tsakanin "<" da "?" don lambar tayi aiki.

  9. 11

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.