apache2:wordpress做靜態檔的 browser caching時,.htaccess設定

步驟一、先打開mod_expires

可參考:
http://programmer.hsinchi.info/2016/12/05/mod-expires/

步驟二、在.htaccess加入以下:

# 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

參考來源:
Apache2 載入 Expires 的模組(mod_expires) 與 設定

WP Super Cache and Browser Caching

wordpress:ajax load more plugin裡的幾個可用變數!

在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;’

這在客製化時派得上用場。

參考:

https://tw.wordpress.org/plugins/ajax-load-more/