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/

發表迴響