have_posts() ) { return; } // Store post IDs for global access. $pyml_post_ids = wp_list_pluck( $pyml_posts->posts, 'ID' ); set_transient( 'blogsy_pyml_post_ids', $pyml_post_ids ); $animation_enabled = Helper::get_option( 'posts_animation' ); $pyml_elements = $args['elements']; $items_html = ''; ob_start(); while ( $pyml_posts->have_posts() ) : $pyml_posts->the_post(); get_the_title(); $categories = get_the_category(); $first_cat = $categories[0] ?? null; $term_class = $first_cat ? ' term-id-' . esc_attr( $first_cat->term_id ) : ''; $animation_cls = $animation_enabled ? ' has-animation' : ''; ?>