/* 
Theme Name:		Hello Elementor Child
Theme URI:		https://elementor.com/
Description:	Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author:			Elementor Team
Author URI:		https://elementor.com/
Template:		hello-elementor
Version:		1.0.0
Text Domain:	hello-elementor-child
Tags:           flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/


/* סידור פוסטים לפי IDs */


add_filter( 'jet-engine/listing/grid/posts-query-args', function( $args ) {

    // אם יש הגדרה של Include posts by IDs (post__in) – סדר לפי הרשימה
    if ( ! empty( $args['post__in'] ) ) {
        $args['orderby'] = 'post__in';
        $args['order']   = 'ASC';
    }

    return $args;
} );


add_filter( 'jet-engine/listing/grid/posts-query-args', function( $args ) {

    // אם הוגדר Include posts by IDs
    if ( ! empty( $args['post__in'] ) ) {
        $args['orderby'] = 'post__in';
        $args['order']   = 'ASC';
    }

    return $args;