Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

How to pass “Blog pages show at most” value into shortcode inside a template

$
0
0

Replies: 1

I’m using Ajax Load More plugin inside a custom theme by inserting a shortcode into index.php template.
<?php echo do_shortcode('[ajax_load_more post_type="post" posts_per_page="10" offset="10" pause="true" scroll="false"]'); }?>
Is there a way to get the value of “Blog pages show at most” from Settings/Reading and pass it into the shortcode to automatically update its posts_per_page and offset values when “Blog pages show at most” value is changed inside the dashboard?


Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>