By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Unofficial 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!
elementor official

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
 
elementor official

Latest posts

Latest Products

Other Elementor Resources

elementor official
elementor official
Top