Query Loop Builder: Container Link Failure
-
I’m using a Container inside the body of a Query Loop Builder (QLB). That container has a dynamic link property that links to the post permalink. I have the fetch count of the QLB set to the default 12.
The problem is that only the first 12 posts have a correct link. From post #13 onwards, all posts have a fixed link corresponding to whatever link was used when the container link was first assigned in the container block’s properties.
If I change the fetch count value, for example to 16, then the links will be correct for the first 16 posts and then fail after that. Thus, it appears that something is going wrong with the way the permalink is obtained whenever additional fetches are done.
Note: neither the Dynamic Post Image or Dynamic Post Title blocks are suitable for my purposes here since the underlying posts aren’t using the feature image or post title properties. Thus, the only way I can get a link for each post is by wrapping the Query Loop Builder’s children in a container and setting the container’s link dynamically to the post permalink.
DETAILED REPRODUCE STEPS
- Create a new post.
- Add a Container block and within the container add an Advanced Text. For testing purposes, just leave the text at its default value.
- In the Container’s properties, set the Container Link to use a Dynamic Url and click on ‘Post Permalink’.
- Outside of the Container, add a Query Loop Builder block.
- Leave the QLB’s properties at their default settings except under Data Settings, where Pagination Type should be set to Infinite Scroll.
- Inside the QLB, replace all the existing blocks with the Container created previously.
- Save the post and display it on the front end.
EXPECTED:
Each post returned by the query would have a link to the underlying post (i.e. the permalink would be linked).
ACTUAL:
The first 12 returned posts will correctly have the permalink of the underlying post. All other returned posts will have the permalink of the new post in which you added the Query Loop Builder.
The topic ‘Query Loop Builder: Container Link Failure’ is closed to new replies.