• Resolved bolus150

    (@bolus150)


    Hello,
    can you tell me if the preloaded amount attribute works?

    I have this shortcode:

    [ajax_load_more container_type=”div” post_type=”post” transition=”fade” transition_speed=”350″ images_loaded=”true” preloaded=”true” preloaded_amount=”4″ posts_per_page=”4″ pause=”true” pause_override=”true” scroll=”false” button_label=”See more” button_loading_label=”Loading..”]

    and at first he doesn’t load me posts. I would like to set 5 posts first and then top up after a few clicks.

    Can you tell me how to do this?

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

    (@dcooney)

    Hi @bolus150
    To use that parameter you need the Preloaded Addon
    https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/

    Do you have this installed?

    Thread Starter bolus150

    (@bolus150)

    I understand that there is no free solution?

    Plugin Author Darren Cooney

    (@dcooney)

    You could run a query before ALM and then use the offset parameter to exclude the posts before.

    Thread Starter bolus150

    (@bolus150)

    $the_query = new WP_Query(
    array(
    ‘post_type’ => ‘post’,
    ‘post_status’ => ‘publish’,
    ‘paged’ => get_query_var(‘paged’),
    ‘posts_per_page’ => get_option( ‘posts_per_page’ ),
    )
    );

    if ($the_query->have_posts()) {
    while ($the_query->have_posts()) {
    $the_query->the_post();
    get_template_part( ‘content/content’, ‘wpis’ );
    }

    echo do_shortcode(‘[ajax_load_more]’);
    } else {
    echo __(“No posts”);
    }
    I have this code, but button don’t working

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Preloaded_amount it works?’ is closed to new replies.