echo '</span><span class="separator"> : </span>'; echo '<span class="discount-price">'; echo get_post_meta(get_the_ID(), 'package-last-minute-widget-text', true); echo '</span>'; echo '</div>'; } else { if ($package_type == 'Learn More' || $package_type == 'None') { if (!empty($price)) { echo '<div class="package-info"><i class="icon-tag"></i>'; echo '<span class="head">' . $translator_price . ' </span>'; echo __(do_shortcode($price), 'gdl_front_end'); echo '</div>'; } } } print_book_now_button(); echo '<div class="clear"></div>'; echo '</div>'; // package information // package content echo '<div class="package-content">'; the_content(); wp_link_pages(array('before' => '<div class="page-link"><span>' . __('Pages:', 'gdl_front_end') . '</span>', 'after' => '</div>')); echo '<div class="clear"></div>'; echo '</div>'; // Include Social Shares if (get_post_meta($post->ID, 'post-option-social-enabled', true) != "No") { echo "<h3 class='social-share-title'>" . $translator_social_share . '</h3>'; include_social_shares(); echo "<div class='clear'></div>"; }
function print_medium_package($item_class, $item_size, $num_excerpt) { global $gdl_admin_translator, $post, $gdl_date_format, $package_id; if ($gdl_admin_translator == 'enable') { $translator_learn_more = get_option(THEME_SHORT_NAME . '_translator_read_more_package', 'Learn More'); $translator_book_now = get_option(THEME_SHORT_NAME . '_translator_book_now_package', 'Book Now!'); $translator_last_minute = get_option(THEME_SHORT_NAME . '_translator_last_minute_package', 'Last Minute'); } else { $translator_learn_more = __('Learn More', 'gdl_front_end'); $translator_book_now = __('Book Now!', 'gdl_front_end'); $translator_last_minute = __('Last Minute', 'gdl_front_end'); } while (have_posts()) { the_post(); echo '<div class="' . $item_class . '">'; $package_type = get_post_meta(get_the_ID(), 'package-type', true); if ($package_type == 'Last Minute') { $package_ribbon = 'last-minute'; $package_type_text = '<span class="head">' . $translator_last_minute . '</span>'; $package_type_text .= '<span class="discount-text">'; $package_type_text .= get_post_meta(get_the_ID(), 'package-type-text', true); $package_type_text .= '</span>'; } else { if ($package_type == 'None') { $package_ribbon = ''; $package_type_text = ''; } else { $package_ribbon = 'normal-type'; $package_type_text = $translator_learn_more; } } // package thumbnail print_package_thumbnail(get_the_ID(), $item_size, $package_ribbon, $package_type_text); echo '<div class="package-content-wrapper">'; // package title echo '<h2 class="package-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>'; // package information $date_type = get_post_meta(get_the_ID(), 'package-date-type', true); if ($date_type == 'Fixed') { $start_date = get_post_meta(get_the_ID(), 'package-start-date', true); $end_date = get_post_meta(get_the_ID(), 'package-end-date', true); echo '<div class="package-date"><i class="icon-time"></i>'; echo get_package_date($start_date, $end_date, $gdl_date_format); echo '</div>'; } else { if ($date_type == 'Duration') { echo '<div class="package-date"><i class="icon-time"></i>'; echo get_post_meta(get_the_ID(), 'package-duration', true); echo '</div>'; } } // package content echo '<div class="package-content">'; if (!empty($post->post_excerpt)) { echo do_shortcode(get_the_excerpt()); } else { echo gdl_get_excerpt($num_excerpt, '... '); } echo '</div>'; // package price if ($package_type == 'Learn More' || $package_type == 'None') { $price = get_post_meta(get_the_ID(), 'package-price', true); if (!empty($price)) { echo '<div class="package-info"><i class="icon-tag"></i>'; echo '<span class="package-price">'; echo __(do_shortcode($price), 'gdl_front_end'); echo '</span>'; echo '</div>'; } } else { if ($package_type == 'Last Minute') { $price = get_post_meta(get_the_ID(), 'package-price', true); if (!empty($price)) { echo '<div class="package-info last-minute"><i class="icon-tag"></i>'; echo '<span class="normal-price">'; echo __(do_shortcode($price), 'gdl_front_end'); echo '</span>'; echo '<span class="discount-price">'; echo get_post_meta(get_the_ID(), 'package-last-minute-widget-text', true); echo '</span>'; echo '</div>'; //package-info-inner } } } print_book_now_button(); echo '<div class="clear"></div>'; echo '</div>'; // blog-context-wrapper echo '<div class="clear"></div>'; echo '</div>'; // package-item } }