• Resolved roffalf

    (@roffalf)


    Hi Support Team,

    I’m currently working on a WordPress Site and using your Plugin. There’s a Job Offers Custom Post Type. I set the offset to 6, but there are only 5 Posts at the moment. Instead of Showing 5 Posts, ist shows nothing. I feel like this is a bug, can you please fix it? I’m using the Shortcode, and it works fine with a smaller offset and on other pages with more posts. I didn’t do anything fancy or custom coding, and it only breaks in this scenario. Please help.

    Thanks,

    Ralf

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

    (@dcooney)

    Hi @roffalf
    As described in the Shortcode Builder.
    “Offset the initial query by?‘x’?number of posts.”

    You’re offsetting the query by 6 and you only have 5 posts. What this means is you’re trying to start Ajax Load More at the 7th post.

    Remove the offset to fix this issue.

    Thread Starter roffalf

    (@roffalf)

    Hi @dcooney, Thanks for your quick response.

    I get that, but in my case, the client initially wants to show up to six posts. The Number of posts are changing regularly due to it being a job offers page.

    To anyone having this same issue in the future:
    I try to solve this with a condition that loads the regular query when it’s under six posts and the shortcode if its more.

    @dcooney this is up to you, but I think it might make sense to provide a fallback for this case in future releases.

    Thanks again, have a nice day

    Ralf

    Plugin Author Darren Cooney

    (@dcooney)

    Nice, not sure what the fallback would be in this specific use case.

    I guess the issue is you are loading posts outside of ALM – using the Preloaded add-on would solve this problem likely but it’s a paid feature.

    Thread Starter roffalf

    (@roffalf)

    Ah, alright. I don’t know how your plugin works, I just thought it might be possible. Anyway, I found my solution and it works fine now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘if offset ist greater than posts, it shows nothing’ is closed to new replies.