<?php $args = array(
    'post_type' => array("movies", "series"),
    'post_status' => 'publish',
    'posts_per_page' => 10,
    'orderby'     => 'modified',
    'meta_query' => array(
        array(
            'key' => 'suggested_movie',
            'value'   => 'on',
            'compare' => '='
        ),
    ),
);
$wp_query = new WP_Query($args);
if ($wp_query->have_posts()) : ?>
    <section class="top-slider rt slider-1 owl-carousel rt-relative">

        <?php while ($wp_query->have_posts()) : $wp_query->the_post();
            global $post;
            $post_id = $post->ID;
            $post_type = get_post_type($post_id);
            $post_permalink = get_the_permalink($post_id);
            $movie_plot = yc_get_post_meta($post_id, 'fa_plot_movie');
            $post_title = get_the_title($post_id);
            $release = yc_get_post_meta($post_id, "release_movie");
            if (!empty($release)) $post_title = $post_title . " " . $release;
            $movie_bg = yc_get_post_meta($post_id, 'movie_thumb_bg');
            $movie_bg = (!empty($movie_bg)) ? wp_get_attachment_image_url($movie_bg, 'full') : '';
            $smallogo = yc_get_post_meta($post_id, 'smalllogo');
            $smallogo = (!empty($smallogo)) ? wp_get_attachment_image_url($smallogo, 'full') : '';
            $disabled_play = yc_get_post_meta($post_id, 'deactive_playonline');
            $play_box = null;
            if (empty($disabled_play) && $post_type == 'movies') $play_box = yc_get_post_meta($post_id, 'movies_playlinks'); ?>
            <div class="item rt rt-relative rt-overflow">
                <?php if (!empty($movie_bg)) : ?><img src="<?php echo $movie_bg; ?>" class="bgz rt rt-absolute"><?php endif; ?>
                <div class="main rt-relative">
                    <div class="info right rt-absolute">
                        <a href="<?php echo $post_permalink; ?>" class="full-link rt rt-absolute"></a>
                        <?php if (!empty($smallogo)) : ?><img src="<?php echo $smallogo; ?>" class="right pic"><?php endif; ?>
                        <h2 class="title rt rt-31 rt-bold"><a href="<?php echo $post_permalink; ?>" rel="bookmark" title="<?php echo $post_title; ?>" class="right rt-fff"><?php echo $post_title; ?></a></h2>
                        <?php if (!empty($movie_plot)) : ?>
                            <div class="text rt rt-ddd rt-16">
                                <p><?php echo $movie_plot; ?></p>
                            </div>
                        <?php endif; ?>
                        <?php if (!empty($play_box)) : ?>
                            <a href="<?php echo get_online_play_link($post_id); ?>" target="_blank" class="btn rt-relative rt-z-index right rt-color rt-fff rt-14 rt-8px"><i class="fa fa-play rt-400 right rt-18"></i> تماشا فیلم</a>
                        <?php endif; ?>
                        <a href="<?php echo $post_permalink; ?>" class="btn rt-relative rt-z-index right rt-blur rt-fff rt-14 rt-8px"><i class="fa fa-info-circle rt-400 right rt-18"></i> اطلاعات بیشتر</a>
                    </div>
                </div>
            </div>
        <?php endwhile; ?>

    </section>
<?php endif;
wp_reset_query(); ?>