• Resolved Treebeard

    (@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!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.