Tagged: CPT, Custom Post Type, layout, shortcode
Hi,
i’m trying to use the avia layout shortcodes with custom post types.
So i duplicated the blog.php file from “enfold/config-templatebuilder/avia-shortcodes/blog.php” and added it in “enfold-child/shortcodes/blog.php”.
I figured out how to register a new avia layout shortcode with that file, let’s call it “blog posts custom”.
It works fine and gets loaded in the layout architect.
Where or what should i change in the “enfold-child/shortcodes/blog.php” file to get posts from my custom post type instead of the standard posts?
Thanks
Hey Fruitcakeworb!
Have you referred to this post – http://kriesi.at/documentation/enfold/use-the-layout-builder-with-any-post-type/? :)
Best regards,
Yigit
Have you correctly read my question?
I’m trying to use the avia layout shortcodes (not the avia layout builder) with custom post types.
I’d like to use posts from a custom post type in the shortcodes.
Hi!
You don’t have to change anything if the the custom post type and its taxonomies are registered properly. The blog posts element will be able to fetch the taxonomies of the custom post type automatically. Edit the blog post elements then set the “Do you want to display blog posts?” settings to the second option in order to display posts from a specific taxonomy. If you can’t find the taxonomy there, it means that the custom post type is NOT registered correctly. We usually recommend the following plugin for custom post types:
https://wordpress.org/plugins/types/
https://wordpress.org/plugins/custom-post-type-ui/
Best regards,
Ismael
Hi Ismael, thank’s.
It worked pretty good!
How can i mark a thread as solved?