Advanced Custom Fields plugin is required for this content.
'; } // Get the ID of the post where the shortcode is placed $current_post_id = get_the_ID(); // Cache-busting string $cache_buster = time(); ob_start(); ?> Advanced Custom Fields plugin is required for this content.'; } ob_start(); $post_id = get_the_ID(); $repeater_field = 'propertiesdata'; // Initial state for details bar $initial_location = 'Click a Card Above'; $initial_units = '...'; $initial_service_mode = '...'; $cards_html = ''; $count = 0; if ( have_rows( $repeater_field, $post_id ) ) { while ( have_rows( $repeater_field, $post_id ) ) { the_row(); // Only keep fields you still want $property_name = esc_html( get_sub_field( 'property_name' ) ); $city = esc_html( get_sub_field( 'city' ) ); $state = esc_html( get_sub_field( 'state' ) ); $units = esc_html( get_sub_field( 'units' ) ); $service_mode = esc_html( get_sub_field( 'service_mode' ) ); // Build location like "Dayton, Ohio" (no weird commas if one is blank) $location = trim( implode( ', ', array_filter( [ $city, $state ] ) ) ); // Card description (ONLY what you want) $description = "Units: {$units}No property data found for this state.
'; } ?>