• Resolved user1986

    (@user1986)


    Hi,

    Thanks for this plugin! I’m currently using it in a project that requires filtering. So, I have a custom post type which has an ACF field. This field holds different radio buttons. All the values of those radio buttons are used as filters. The problem I have is that when I set the value of the data-posts-per-page attribute to a small number (e.g. 2) I don’t see any value or I don’t see the expected number of posts. But, if I set a large value (e.g. 90) I can see all the values. As far as I know, the value of this attribute specifies the number of posts that will be shown after every request. So, if I set it to 2, I expect 2 posts to be shown per request, right?

    Also, I’m using different repeater templates to check the value of the selected radio button.

    Here’s part of my snippet:

    <ul id="alm-filter-nav">
      <li>
        <a href="#" data-repeater="template_1" data-post-type="myposttype" data-posts-per-page="2" data-scroll="false" data-button-label="All" </a>
      </li>
      <li>
        <a href="#" data-repeater="template_2" data-post-type="myposttype" data-posts-per-page="2" data-scroll="false" data-button-label="Category1" </a>
      </li>
      ---
    </ul>
    
    <ul>
      <?php
        echo do_shortcode('[ajax_load_more repeater="template_3" post_type="myposttype" scroll="false" posts_per_page="12" button_label="Load More"]');
      ?>
    </ul>

    If you need any other info, I can send it through email/contact form.

    Thanks in advance!

    https://www.ads-software.com/plugins/ajax-load-more/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with filtering’ is closed to new replies.