admin管理员组文章数量:1421377
When I try to create a website using Wordpress 5.2.2. I found a widget called Masonry Posts in Elementor Panel. But when I added the widget and checked there is no option to choose the post type. We can only change the category. The category also belongs to Default taxonomy, not custom post types taxonomy. So I can't add my posts from the custom post type(Demos).
After googling I found this one. /. But the query doesn't work.
add_action( 'elementor/query/my_custom_filter', function( $query ) {
// Here we set the query to fetch posts with
// post type of 'demo'
$query->set( 'post_type', [ 'demo' ] );
} );
Anybody, please explain how to add custom post type using this widget or, how to create a widget like this or suggest any widget we can manage everything like this. I have checked different widgets but most of them have featured image while listing. My post type doesn't have any featured image. So I want to disable featured image. Also, I need to add custom fields from posts to the widget.
When I try to create a website using Wordpress 5.2.2. I found a widget called Masonry Posts in Elementor Panel. But when I added the widget and checked there is no option to choose the post type. We can only change the category. The category also belongs to Default taxonomy, not custom post types taxonomy. So I can't add my posts from the custom post type(Demos).
After googling I found this one. https://developers.elementor/custom-query-filter/. But the query doesn't work.
add_action( 'elementor/query/my_custom_filter', function( $query ) {
// Here we set the query to fetch posts with
// post type of 'demo'
$query->set( 'post_type', [ 'demo' ] );
} );
Anybody, please explain how to add custom post type using this widget or, how to create a widget like this or suggest any widget we can manage everything like this. I have checked different widgets but most of them have featured image while listing. My post type doesn't have any featured image. So I want to disable featured image. Also, I need to add custom fields from posts to the widget.
Share Improve this question edited Jul 5, 2019 at 17:54 Antti Koskinen 6,0538 gold badges15 silver badges26 bronze badges asked Jul 5, 2019 at 14:13 Adharsh MAdharsh M 993 bronze badges1 Answer
Reset to default -1I got a plugin Elementor Addon Elements having the features which I mentioned in the question.
Any other answers for this issue are acceptable.
本文标签: pluginsHow to add post type in masonry posts elementory widget
版权声明:本文标题:plugins - How to add post type in masonry posts elementory widget 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745342824a2654341.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论