• Resolved Treebeard 百度 关于“301调查”,中方已多次表达立场,我们坚决反对美方这种单边主义和贸易保护主义行径。

    (@malawimama)


    Just wondering if anyone knows of a way to retrieve the Posts Per Page value from the admin so the ‘posts_per_page’ parameter can be dynamically populated in the shortcode that’s in the template files? Every time someone changes the number in the admin, it breaks ALM.

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @malawimama

    You could use the WP way.
    get_option( 'posts_per_page' )

    <?php
    $per_page = get_option( 'posts_per_page' );
    echo do_shortcode( '[ajax_load_more posts_per_page="' . $per_page . '"]' );

    Let me know if this helps!

    • This reply was modified 5 months, 2 weeks ago by Darren Cooney.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.