Ultimate Multisite code snippet များကို ကျွန်ုပ်တို့ GitHub repository တွင် အသုံးပြုနည်း
GitHub repository တွင် Ultimate Multisite အသုံးပြုသူများ မကြာခဏ တောင်းဆိုလေ့ရှိသော code snippet များ ရရှိနိုင်ပါသည်။ ဤ snippet များသည် sign-up page များတွင် Google Analytics script ထည့်သွင်းခြင်း သို့မဟုတ် admin dashboard မှ meta box များကို ဖျောက်ထားခြင်းကဲ့သို့သော လုပ်ဆောင်ချက်အသေးများ ထည့်သွင်းလိုသူများအတွက် ဖြစ်ပါသည်။
ဤဆောင်းပါးတွင် ဤ code များကို မည်သို့အသုံးပြုရမည်၊ အထူးသဖြင့် မည်သ ည့်နေရာတွင် ထားရမည်ကို ပြသပေးပါမည်။
အောက်ပါ link တွင် snippet များကို ရှာတွေ့နိုင်ပါသည်။
https://github.com/next-press/wp-ultimo-snippets/
Code ထည့်သွင်းရန် နည်းလမ်း ၂ ခု ရှိပါသည်
-
သင့် theme ၏ functions.php file တွင်
-
Must-Use Plugins (mu-plugins)
သင့် theme ၏ functions.php file တွင် snippet ထည့်သွင်းနည်း
-
သင့် WordPress Network admin dashboard သို့ ဝင်ရောက်ပြီး Themes > Theme Editor သို့ သွားပါ (အောက်ပါ screenshot ကို ကြည့်ပါ)။
-
"Edit Themes" စာမျက်နှာတွင်၊ သင့်စခရင်၏ ညာဘက်အပေါ်ထောင့်ရှိ dropdown field တွင် သင်အသုံးပြုနေသော theme ကို ရွေးချယ်ထားကြောင်း သေချာပါစေ (အောက်ပါ screenshot တွင် #3)။
-
File ကို ဖွင့်ရန် "Theme Files" အပိုင်းအောက်ရှိ functions.php file ကို နှိပ်ပါ။ အောက်ဆုံးသို့ scroll ဆင်းပြီး GitHub repository မှ ရရှိသော Ultimate Multisite snippet ကို paste လုပ်ပါ။
Must-Use Plugins (mu-plugins) ဖန်တီးနည်း
WordPress တွင် "Must-Use Plugins" သို့မဟုတ် အတိုကောက် "mu-plugins" ဟုခေါ်သော စိတ်ကြိုက် လုပ်ဆောင်ချက်များ ထည့်သွင်းနိုင်သည့် feature တစ်ခု ရှိပါသည်။
ဤအထူး mu-plugins များသည် အခြားသာမန် plugin များအားလုံးမတိုင်မီ load လုပ်ပြီး၊ ၎င်းတို့ကို deactivate လုပ်၍မရပါ။ Multisite network တစ်ခုတွင်၊ ဤ mu-plugins များရှိ code သည် သင့် installation ရှိ site အားလုံးတွင် load လုပ်မည် ဖြစ်ပါသည်။
1. သင့် WordPress install ၏ filesystem ကို ဝင်ရောက်ရန် FTP သို့မဟုတ် SSH အသုံးပြုပါ။
2. သင့် WordPress install ၏ wp-content directory အတွင်း၊ mu-plugins ဟုအမည်ပေးထားသော directory အသစ်တစ်ခု ဖန်တီးပါ။
3. Notepad သို့မဟုတ် code editor တစ်ခုခုကို အသုံးပြု၍ သင့်ကွန်ပျူတာတွင် wu-snippet.php ဟုအမည်ပေးထားသော PHP file အသစ်တစ်ခု ဖန်တီးပါ။
4. GitHub repository မှ ရရှိသော Ultimate Multisite code snippet ကို file ထဲတွင် ထည့်သွင်းပြီး သိမ်းဆည်းပါ။ သင့် mu plugin ကို အမှတ်အသား ပြုလုပ်ရန် code snippet ၏ အပေါ်ဆုံးတွင် ဤ code ကိုလည်း ထည့်သွင်းနိုင်ပါသည်။