Ntxiv Cov Chaw Tshaj Lij rau Koj Cov Ntsiab Lus WordPress

wordpress social icons

WordPress muab cov neeg siv khoom profile nrog chaw rau kev sib txuas; txawm li cas los xij, ntau lub vev xaib kev nyiam Facebook thiab Google muab txoj hauv kev rau koj tag nrho lub vev xaib lossis blog kom muaj kev qhia nyob hauv cov tes hauj lwm ntawd. Peb tau ua haujlwm rau tus neeg siv lub vev xaib lub lim tiam no uas peb xav ua kom yooj yim rau lawv teeb tsa thiab ntxiv lawv lub xaib kev sib raug zoo, yog li peb tau xaiv cov kev xaiv ntxiv rau lawv WordPress General Chaw page.

Peb thawj kauj ruam yog los hloov lawv Cov ntsiab lus hais qhia (ib txwm functions.php) thiab zwm npe rau txhua qhov ntawm lub chaw peb xav kom ntxiv:

 // ————— Ntxiv Cov Chaw Rau Cov Chaw Dav Dav —————– muaj nuj nqi social_settings_api_init () {// Ntxiv cov ntu rau cov chaw dav dav yog li peb tuaj yeem ntxiv peb // teb rau nws ntxiv_settings_section ('social_setting_section', 'Social sites) hauv web ',' social_setting_section_callback_function ',' general '); // Ntxiv teb nrog rau cov npe thiab kev ua haujlwm los siv rau peb qhov tshiab // nqis, muab tso rau hauv peb cov seem tshiab ntxiv_settings_field ('general_setting_facebook', 'Facebook Page', 'general_setting_facebook_callback_function', 'general', 'social_setting_section'); // Sau peb qhov teeb tsa kom $ _POST tuav tau ua rau peb thiab // peb tus lej rov qab ua haujlwm tsuas yog tau ncha lub register_setting ('hais txog', 'general_setting_facebook'); add_settings_field ('general_setting_twitter', 'Twitter Account', 'general_setting_twitter_callback_function', 'dav dav', 'social_setting_section'); register_setting ('hais txog', 'general_setting_twitter'); add_settings_field ('general_setting_googleplus', 'Google Ntxiv Nplooj', 'general_setting_googleplus_callback_function', 'dav dav', 'social_setting_section'); register_setting ('hais txog', 'general_setting_googleplus'); add_settings_field ('general_setting_youtube', 'Youtube Page', 'general_setting_youtube_callback_function', 'general', 'social_setting_section'); register_setting ('hais txog', 'general_setting_youtube'); add_settings_field ('general_setting_linkedin', 'LinkedIn Nplooj', 'general_setting_linkedin_callback_function', 'dav dav', 'social_setting_section'); register_setting ('hais txog', 'general_setting_linkedin'); } ntxiv_action ('admin_init', 'social_settings_api_init');

Peb cov kauj ruam tom ntej yog ntxiv cov thaj chaw tiag tiag hauv nplooj General General nplooj ntawv uas yuav khaws cov ntaub ntawv hauv lawv:

 // —————- Chaw seem ntu rov qab muaj nuj nqi ———————- muaj nuj nqi social_setting_section_callback_function () {ncha ' Seem no yog qhov chaw koj tuaj yeem txuag cov chaw sib raug zoo uas cov nyeem tuaj yeem pom koj hauv Is Taws Nem. '; } ua haujlwm general_setting_facebook_callback_function () {ncha ' '; } ua haujlwm general_setting_twitter_callback_function () {ncha ' '; } ua haujlwm general_setting_googleplus_callback_function () {ncha ' '; } ua haujlwm general_setting_youtube_callback_function () {ncha ' '; } ua haujlwm general_setting_linkedin_callback_function () {ncha ' '; }

Tam sim no, txhua lub sijhawm cov neeg xav tau hloov kho lawv cov nplooj ntawv sib raug zoo, lawv tsuas tuaj yeem hloov kho cov chaw teeb tsa nyob rau hauv lawv cov WordPress General Chaw Haujlwm. Nyob rau hauv lub ntsiab lus, peb tsuas rov hais qhov teeb tsa rau txhua qhov chaw xav tau (hauv tus neeg siv cov ntaub ntawv no, nws yog qhov kev tawm nyob rau hauv lub ntsiab lus ntawm lawv lub xaib):

 

2 Comments

  1. 1
    • 2

      Yog, paub tseeb yuav ua tau. Kuv tsuas xav tias nws xav tau qee lub tswb nrov ntxiv thiab cov xuav thawj zaug ... zoo li cia li tshaj tawm G + tus tshaj tawm txuas hauv cov ntawv sau, cov ntaub ntawv qhib kab meta rau Facebook, etc. Tsuas yog ua qhov no tsis zoo li txias txaus!

Yuav ua li cas koj xav hais tias?

Qhov Web site no siv Akismet los txo cov kev pabcuam. Kawm li cas koj cov ntaub ntawv tawm tswv yim tiav.