WAIT: Query Loop issue

I’m working with a custom post type displayed within a query loop, which includes a shortcode that outputs content from another plugin. However, I’m encountering issues with both infinite scroll and pagination:

  1. When using infinite scroll, the shortcode content doesn’t load as expected.
  2. Pagination doesn’t work at all, and it seems to have a serious bug that requires fixing.

Hi @thehedgedog,

I’ve tested the shortcode (that only outputs “Hello World”), and the output was working nicely, even when using infinite scroll. Note that if your shortcode outputs a <script> tag, that script will not execute: Element: innerHTML property - Web APIs | MDN

For a second (pagination) problem, I can’t reproduce the bug, but I would love to. Can you give me a bit more info, on what is your setup of the custom query and pagination element?

Thanks,
Matej

The shortcode I’m using is in a meta box which I created with JetEngine, as each post has unique content generated by different shortcodes. This content is provided by the Sonnar MP3 Player plugin, which I’m primarily using for audio waveform generation.

so the shortcode is basically a dynamic content on each post

the shortcode widget content in the query looks like this

{je_presets_short_code} <—which I fetch data from a custom meta box of each post

The issue with pagination is that, when I click to navigate to a different page, the content doesn’t update—it remains stuck on the first page. The content doesn’t change at all.

The shortcode works fine with JetEngine listing grid, but Jet Engine doesn’t have the function I need, like sorting with meta key and taxonomy

This seems like a dynamic tag, not a shortcode. Locally I’ve tested with “Shortcode” element like this :
slika

For pagination and all this, do you have URL that you can share - so I can check what is happening?

Thanks.

yes, that is a dynamic tag which fetches a shortcode from a custom meta box in each post

So, that dynamic tag returns a shortcode. I’ve updated my example in local install, and it works:

Note that the demo shortcode code looks like this:

Have you considered sending the post id with the shortcode so that it can propoerly identoify the code the post data?

[my_shortcode id="{{post.id}}"]

Then you can add the id into the shortcode function so to make sure the proper record is being accessed.

should
albums=“6824

be

albums=“6824"

That is one awesome shortcode!!!

@thehedgedog,

so, have you figured it out, or it’s still not working? I see that you removed last few messages, and I’m wondering if I should set to to no bug :slight_smile:

Best regards,
Matej

No, query loop pagination is not working in the custom post type (I mean if the query loop is in a custom post type page) this needs to be resolved, the third-party plugin is not the primary problem right now.

I just removed some of the messages containing my website URL.

Pagination only works on a normal page

@thehedgedog, would it be possible for you to send temporary login credentials to your website and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase, so we can take a look at this pagination problem?

That would help solving the issue :slight_smile:
Thanks.

I think I found the problem.

When you change the Permalink Settings in WordPress to “Post Name”

the query loop inside the CPT will not work properly.

I’ve asked my client to set up a staging environment for me, and the email should be on its way.

I always use “Post Name” for a permalink, so it’s most likely not that. Will wait for an email, thanks!


Matej