Tagged: Avia Page Builder, enfold
Hi there,
I’m using the Enfold theme on my website. I made my own shortcode, which displays a loop of a custom post type. But, when I use this shortcode inside the Avia Page Builder, it puts the shortcode content outside the avia grid.
Is there a function which builds the avia grid, so I can execute the shortcode function afterwards? Or is there another solution to this problem?
Hope you can help!
Hey Tim!
Thank you for using our theme.
Did you try the ALB Element “Blog Posts”. There you can select “Display entries from a custom taxonomy” and that should display your custom post types in the next select box “Which Entries”. And you can select grid layout and the # of colums you want.
You can also have a look into the core files:
config-templatebuilder\avia-shortcodes\blog.php
config-templatebuilder\avia-shortcodes\postslider.php
and try to change the query params there directly or via a hook function.
Come back if you need more help.
Regards,
Günter
Hi Günter!
Thanks for the quick reply. Unfortunately I can’t use the “Blog Posts” elements, because I want some custom fields to show up inside the overview.
Is it maybe because I’m using a <section> to display the post type that it gets pulled out of the template grid? Or is the ‘ShortcodeHelper::avia_apply_autop’ function inside /config-tempatebuilder/avia-shortcodes/textblock.php doing something?
Thanks for your help!
Hi Günter!
I think I’ve found the problem. It was because I was echoing inside my shortcode function, instead of returning the value. It now works inside the grid as well. Thanks for you help!