plugins - How to add post type in masonry posts elementory 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

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 badges
Add a comment  | 

1 Answer 1

Reset to default -1

I got a plugin Elementor Addon Elements having the features which I mentioned in the question.

Any other answers for this issue are acceptable.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745342824a4623406.html

相关推荐

  • plugins - How to add post type in masonry posts elementory 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

    2小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信