), * 'rail' → homepage rail card (
  • ). * * Markup mirrors the .dcard rules in assets/css/vc-design.css (ported from * new front/tours.html and index.html). */ defined( 'ABSPATH' ) || exit; $post_id = isset( $post_id ) ? absint( $post_id ) : get_the_ID(); if ( ! $post_id ) { return; } $variant = isset( $variant ) ? $variant : 'wide'; $permalink = get_permalink( $post_id ); $title = get_the_title( $post_id ); $price = get_post_meta( $post_id, '_vc_price_from', true ); $currency = get_post_meta( $post_id, '_vc_currency', true ); $rating = get_post_meta( $post_id, '_vc_rating', true ); $duration = get_post_meta( $post_id, '_vc_duration_text', true ); $minutes = absint( get_post_meta( $post_id, '_vc_duration_minutes', true ) ); if ( '' === (string) $duration && $minutes ) { $duration = vc_duration_human( $minutes ); } $excerpt = has_excerpt( $post_id ) ? get_the_excerpt( $post_id ) : wp_trim_words( wp_strip_all_tags( (string) get_post_field( 'post_content', $post_id ) ), 22 ); $rating_html = ''; if ( '' !== (string) $rating ) { $rating_html = '' . vc_icon( 'star', 'icon--12 rating__star' ) . '' . esc_html( number_format_i18n( (float) $rating, 1 ) ) . '/5'; } $img_html = vc_tour_image_html( $post_id, 'dcard__img' ); $title_link = '' . esc_html( $title ) . ''; ob_start(); ?>