Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #397579

    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!

    #397680

    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

    #398008

    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!

    #398016

    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!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Shortcode inside Avia Page Builder’ is closed to new replies.