public static function display_voyages($query) { $voyages = ""; if ($query->have_posts()) { $voyages .= "<div id=\"slides\" class='main-slider'>"; $voyages .= "<ul class=\"slides-container\">"; while ($query->have_posts()) { $query->the_post(); $voyages .= " <li>"; $id = $query->post->ID; $post = get_post($id); $feature_image = wp_get_attachment_url(get_post_thumbnail_id($id)); $voyages .= "<img src=\"{$feature_image}\" alt=\"\" class=\"ui image\"/>"; $voyages .= "<div class=\"ui container\">\r\n <div class=\"ui grid\">\r\n <div class=\"twelve wide column\" id=\"slider-text\">\r\n <h1 class=\"fitText\" style=\"text-transform:uppercase\">" . get_the_title($id) . "</h1>\r\n <h4>" . get_the_excerpt() . "</h4>\r\n <br>\r\n <a href=\"" . get_permalink($id) . "\" class=\"ui huge animated fade inverted button\" tabindex=\"0\">\r\n <div class=\"visible content\">" . Voyage::price($id) . "</div>\r\n <div class=\"hidden content\">\r\n " . __('More info', 'sage') . "\r\n </div>\r\n </a>\r\n </div>\r\n </div>\r\n </div>"; $voyages .= " </li>"; } $voyages .= "</ul>"; $voyages .= "</div>"; } else { $voyages .= "<h3>" . __("Sorry, No voyages", "sage") . "</h3>"; } echo $voyages; wp_reset_postdata(); }
$voyage_included = get_post_meta(get_the_ID(), 'included', true); $voyage_not_included = get_post_meta(get_the_ID(), 'not_included', true); $voyage_cancelation = get_post_meta(get_the_ID(), 'cancelation', true); $voyage_payment = get_post_meta(get_the_ID(), 'payment', true); $gallery = get_post_meta(get_the_ID(), 'gallery', false); ?> <br> <table class="ui table basic unstackable" style="color:white;"> <tr> <td><i class="money icon"></i><strong><?php _e('Price', 'sage'); ?> </strong></td> <td> <strong><?php echo Voyage::price($post->ID); ?> </strong> </td> </tr> <tr> <td><i class="calendar icon"></i><strong><?php _e('Duration'); ?> </strong></td> <td> <strong> <?php $number_days = get_post_meta(get_the_ID(), 'days', true); $number_nights = get_post_meta(get_the_ID(), 'nights', true); if ($number_days) {