• Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

Custom query multiple sources different badges

F

fivehorizons79

New Member
Dear all,
I'm working with E.Pro and Events Manager.
I'm using the posts widget in order to show the list of news (posts) and events (events coming from EM plugin) together in the same page sorted by post date thanks to the following custom query:

Code:
add_action( 'elementor_pro/posts/query/eventi_HP', function ($query){
    $query->set('post_type', [ 'post', 'event' ]);
    $query->set('orderby', array('post_date'=>'DESC'));
    }
    );

I like very much the badge option but I can choose only between "Post categories" and "Events categories" and obviously appears only the selected one.
I would really appreciate to have "post category" badge on the posts and "Events category" on events posts.

I suppose to have to force the taxonomy into the loop but honestly I'm not so good in coding.

Any kind of help will be really appreciated.

Ciao
Alberto
 

Latest Resources

Other Elementor Resources

elementor official

Still stuck? Ask the forum

Post your question with a screenshot and a link if you can, and a member will usually reply within a day. Free to join, no sales pitch.

Create a free account
Top