Settingsara Saitunan Jama'a zuwa Tsarin WordPress ɗin ku

gumakan shafukan yanar gizo na wordpress

WordPress yana ba da bayanan mai amfani tare da saitunan don haɗin zamantakewar; duk da haka, shafukan yanar gizo da yawa kamar Facebook da kuma Google+ ba da dama ga duk rukunin yanar gizonku ko blog don kasancewa a cikin waɗannan hanyoyin sadarwar. Muna aiki a kan rukunin abokan harka a wannan makon inda muke son sauƙaƙa musu sauƙi don saitawa da ƙara hanyoyin haɗin yanar gizon su, don haka muka ƙara ƙarin zaɓuɓɓuka zuwa Saitunan Saitunan WordPress page.

Matakinmu na farko shi ne sabunta Ayyukansu na Jigo (galibi functions.php) da kuma rijistar kowane saitunan da muke son ƙarawa:

 // ————— Settingsara Saituna zuwa Gabaɗaya Saituna —————– aiki social_settings_api_init () {// Addara sashin zuwa saitunan gaba ɗaya don mu ƙara filinmu // a gare shi add_settings_section ('social_setting_section', 'Social shafukan akan yanar gizo ',' social_setting_section_callback_function ',' general '); // Addara filin tare da sunaye da aikin da za a yi amfani da su don sabon saitin //, sanya shi a cikin sabon sashinmu add_settings_field ('general_setting_facebook', 'Facebook Page', 'general_setting_facebook_callback_function', 'general', 'social_setting_section'); // Yi rijistar saitinmu don $ _POST ana yi mana kuma // aikinmu na kiran baya kawai ya maimaita rajistar_zuwa ('janar', 'general_setting_facebook'); add_settings_field ('general_setting_twitter', 'Twitter Account', 'general_setting_twitter_callback_function', 'general', 'social_setting_section'); regista_setting ('general', 'general_setting_twitter'); add_settings_field ('general_setting_googleplus', 'Google Plus Page', 'general_setting_googleplus_callback_function', 'general', 'social_setting_section'); register_setting ('general', 'general_setting_googleplus'); add_settings_field ('general_setting_youtube', 'Youtube Page', 'general_setting_youtube_callback_function', 'general', 'social_setting_section'); rajista_zuwa ('janar', 'general_setting_youtube'); add_settings_field ('general_setting_linkedin', 'LinkedIn Page', 'general_setting_linkedin_callback_function', 'general', 'social_setting_section'); rajista_setting ('general', 'general_setting_linkedin'); } add_action ('admin_init', 'social_settings_api_init');

Matakinmu na gaba shine ƙara ainihin filayen a cikin Shafin Saitunan Gabaɗaya wanda zai adana bayanin a cikinsu:

 // —————- Sashin saitunan aikin kira ———————- aiki social_setting_section_callback_function () {echo ' Wannan bangare shine inda zaka iya ajiye shafukan sada zumunta inda masu karatu zasu iya nemo ka a Intanet. '; } aikin general_setting_facebook_callback_function () {amsa kuwwa '  '; } aikin general_setting_twitter_callback_function () {amsa kuwwa '  '; } aikin general_setting_googleplus_callback_function () {amsa kuwwa '  '; } aikin general_setting_youtube_callback_function () {amsa kuwwa '  '; } aikin general_setting_linkedin_callback_function () {amsa kuwwa '  '; }

Yanzu, kowane lokaci abokin ciniki yana so ya sabunta saitunan shafin zamantakewar su, suna iya sabunta saitunan saiti a cikin Babban Saitunan WordPress. A cikin taken, kawai muna tunatar da saitin a duk inda ake buƙata (a cikin batun abokin harka, ya kasance sandar maɓallin kafofin watsa labarun a cikin taken shafin su):


		

2 Comments

  1. 1
    • 2

      Ee, tabbas zai iya. Ina tsammanin yana buƙatar ƙarin ƙarin ƙararrawa da bushe-bushe da farko… kamar buga ta atomatik mahaɗin G + a cikin taken, buɗe jadawalin meta na Facebook, da sauransu. Yin hakan bai zama mai kyau ba!

Me kuke tunani?

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