Popup Template: How to filter Posts by Category in Loop Element?
Hi BeTheme team,
I’m working on a custom popup using the Popup Template feature. Inside the popup, I want to display a list of posts using the Loop element. Everything works fine, but unfortunately, there’s no option to select a post category when configuring the loop inside the popup.
The strange thing is: I already have multiple categories created and assigned to posts, but none of them are selectable in the loop element within the popup template. In other templates (e.g. pages), the categories show up fine – it's just in the popup where they don’t appear.
However, I urgently need to show posts from one specific category only inside the popup.
Is there any hack or PHP snippet I could use to force the loop to filter by a specific category even if the builder UI doesn't allow it?
I’m absolutely fine with using a filter hook or modifying a child theme if necessary.
Any suggestion or workaround would be extremely appreciated – this is quite urgent for the project I’m working on.
Thanks a lot in advance!
Best regards,
Comments
Hey,
Please send us the WordPress dashboard and FTP access privately through the contact form, which is on the right side at https://themeforest.net/user/muffingroup#contact and we will check what might be the reason.
Notice!
Please attach a link to this forum discussion.
Sending incorrect or incomplete data will result in a longer response time.
Therefore, please ensure that the data you send are complete and correct.
Thanks
Additional note:
I’ve already sent you the access credentials via the support form.
I also tested the Loop element on a regular Page, and it seems the issue is not limited to popups.
In the popup template, at least the category dropdown shows an option called "Current" (even though it's not usable for me in this case).
However, when I add a Loop element to a Page, the category selection dropdown is completely empty. I have multiple categories created and properly assigned to posts, but none of them appear in the list when editing the loop.
What's interesting:
On other websites using the same BeTheme version, the category selection in the Loop element works perfectly fine – both in popups and in regular pages. So it seems this issue is project-specific, but I can’t figure out what’s causing it.
Would really appreciate your help or any workaround to make category-based filtering work again.
Thanks again!
We could not access your website:
Can you whitelist Poland, please?
Thanks
Geoblocking has been temporarily disabled. You can use WordPress again.
We have corrected it on your website.
Please check it out.
Best regards
Thank you, it works now. Please let me know what the problem was.
For some unknown reason, categories on your website are saved as objects, not an array.
We made a correction so Query Loops will see objects as well.
Best regards