查看Ubuntu 版本
lsb_release -a
參考文章:
https://help.ubuntu.com/community/CheckingYourUbuntuVersion
lsb_release -a
參考文章:
https://help.ubuntu.com/community/CheckingYourUbuntuVersion
用pagespeed測試後,發現非同步載入可以讓頁面更快顯現,加快網頁讀取速度,在wordpress下可安裝以下兩個外掛:
可參考:
http://programmer.hsinchi.info/2016/12/05/mod-expires/
# BEGIN EXPIRES ExpiresActive On ExpiresDefault "access plus 10 days" ExpiresByType text/css "access plus 1 week" ExpiresByType text/plain "access plus 1 month" ExpiresByType image/svg+xml "access 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-icon "access plus 1 year" # END EXPIRES
當靜態檔要做browser caching 時,需要給header,這時需要打開apache的mod_expires module。
指令:
a2enmod expires sudo service apache2 restart #重開
最近看到這篇文章:
Did You Receive A Policy Violation Warning?
帳戶被停或廣告被停相關問答:
AdSense account disabled for invalid activity
求助中心:
做個筆記,若廣告被停,可到以下網址試試。
在ajax load more plugin裡面的repeater templates,可以呼叫以下幾個變數:
$alm_current – Returns the current item number in the current Ajax Load More loop and will reset to zero with every ‘Load More’ action.. ‘echo $alm_current;’
$alm_page – Returns the current page number. ‘echo $alm_page;’
$alm_item – Returns the current item number within your loop. ‘echo $alm_item;’
$alm_found_posts – Returns the total number of posts found within the entire WordPress query. ‘echo $alm_found_posts;’
這在客製化時派得上用場。
參考:
在single.php(單篇文章中)加入以下程式碼:
$cats = array(); foreach (get_the_category($post_id) as $c) { $cat = get_category($c); array_push($cats, $cat->slug); } if (sizeOf($cats) > 0) { $post_categories = implode(',', $cats); } else { $post_categories = 'Not Assigned';
參考文章:https://developer.wordpress.org/reference/functions/get_the_category/
在repeater template裡加上下面這隻js:
//static.addtoany.com/menu/page.js
參考:
https://www.addtoany.com/buttons/customize/multiple_buttons_customize