function print_blog_widget_carousel($item_class, $item_size, $num_excerpt, $full_content, $blog_size) { global $more, $gdl_date_format, $gdl_admin_translator; if ($gdl_admin_translator == 'enable') { $translator_continue_reading = get_option(THEME_SHORT_NAME . '_translator_continue_reading', 'Continue Reading'); } else { $translator_continue_reading = __('Continue Reading ', 'gdl_front_end'); } if ($full_content == 'Yes') { $more = 0; } $blog_row_size = 0; $blog_size = str_replace(' Blog Widget', '', $blog_size); echo '<div class="blog-carousel-wrapper">'; echo '<div class="blog-nav-wrapper">'; echo '<a class="blog-nav left" ></a>'; echo '<a class="blog-nav right" ></a>'; echo '</div>'; // blog-nav-wrapper echo '<div class="blog-carousel-holder row" data-index="0">'; while (have_posts()) { the_post(); print_item_size($blog_size, 0.1, $item_class . ''); // blog content echo '<div class="blog-content-wrapper">'; // blog thumbnail print_blog_thumbnail(get_the_ID(), $item_size); echo '<h2 class="blog-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>'; // blog information echo '<div class="blog-info-wrapper">'; echo '<div class="blog-date">'; echo '<a href="' . get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')) . '" >'; echo get_the_time($gdl_date_format); echo '</a>'; echo '</div>'; echo '<div class="blog-comment"><span class="blog-info-divider">|</span>'; comments_popup_link(__('0 Comment', 'gdl_front_end'), __('1 Comment', 'gdl_front_end'), __('% Comments', 'gdl_front_end'), '', __('Comments are Off', 'gdl_front_end')); echo '</div>'; echo '<div class="clear"></div>'; echo '</div>'; // blog info wrapper echo '<div class="blog-content">'; if ($full_content == "No") { echo gdl_get_excerpt($num_excerpt, '... '); } else { the_content($translator_continue_reading); } echo '</div>'; // blog content echo '</div>'; // blog content wrapper echo '</div>'; // item_class } echo '</div>'; // blog carousel holder echo '<div class="clear"></div>'; echo '</div>'; // gdl-carousel-wrapper }
print_stunning_text($item_xml); break; case 'Tab': print_item_size(find_xml_value($item_xml, 'size')); print_tab_item($item_xml); break; case 'Testimonial': print_item_size(find_xml_value($item_xml, 'size'), 'wrapper'); print_testimonial($item_xml); break; case 'Toggle-Box': print_item_size(find_xml_value($item_xml, 'size')); print_toggle_box_item($item_xml); break; default: print_item_size(find_xml_value($item_xml, 'size')); break; } echo "</div>"; } } echo "</div>"; // end of gdl-page-item get_sidebar('left'); echo "</div>"; // gdl-page-float-left get_sidebar('right'); ?> <br class="clear"> </div>
if ($item_xml->nodeName != 'Color-Open' && $item_xml->nodeName != 'Color-Close') { $additional_style = ''; $additional_class = strtolower($item_xml->nodeName) . '-item-class '; $additional_class = $additional_class . strtolower($item_xml->nodeName) . '-item-class-' . $item_count; if ($item_xml->nodeName == 'Blog' || $item_xml->nodeName == 'Portfolio') { $item_margin = find_xml_value($item_xml, 'item-margin', false, 40); } else { $item_margin = find_xml_value($item_xml, 'item-margin', false, 45); } $item_margin = intval($item_margin); if ($item_margin <= 50) { $additional_class = $additional_class . ' mb' . $item_margin; } else { $additional_style = 'margin-bottom: ' . $item_margin . 'px;'; } $gdl_item_row_size = print_item_size(find_xml_value($item_xml, 'size'), $gdl_item_row_size, $additional_class, 'div', 'div', $additional_style); switch ($item_xml->nodeName) { case 'Accordion': print_accordion_item($item_xml); break; case 'Blog': print_blog_item($item_xml); break; case 'Contact-Form': print_contact_form($item_xml); break; case 'Column': print_column_item($item_xml); break; case 'Column-Service': print_column_service($item_xml);
function print_blog_grid($item_class, $item_size, $num_excerpt, $full_content, $blog_size) { global $more, $gdl_date_format, $gdl_admin_translator; if ($gdl_admin_translator == 'enable') { $translator_continue_reading = get_option(THEME_SHORT_NAME . '_translator_continue_reading', 'Continue Reading'); } else { $translator_continue_reading = __('Continue Reading ', 'gdl_front_end'); } if ($full_content == 'Yes') { $more = 0; } $blog_row_size = 0; $blog_size = str_replace(' Blog Grid', '', $blog_size); while (have_posts()) { the_post(); $blog_row_size = print_item_size($blog_size, $blog_row_size, $item_class . ''); // blog content echo '<div class="blog-content-wrapper">'; // blog thumbnail print_blog_thumbnail(get_the_ID(), $item_size, true); echo '<h2 class="blog-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>'; echo '<div class="blog-content">'; if ($full_content == "No") { echo gdl_get_excerpt($num_excerpt, '... '); } else { the_content($translator_continue_reading); } // blog information echo '<div class="blog-info-wrapper">'; echo '<div class="blog-date">'; echo '<span class="head">' . __('Posted On', 'gdl_front_end') . '</span> '; echo '<a href="' . get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')) . '" >'; echo get_the_time($gdl_date_format); echo '</a>'; echo '</div>'; echo '<div class="blog-author">'; echo '<span class="separator">, </span>'; echo '<span class="head">' . __('By', 'gdl_front_end') . '</span> '; echo the_author_posts_link(); echo '</div>'; echo '<div class="clear"></div>'; echo '</div>'; // blog information echo '</div>'; // blog content echo '</div>'; // blog content wrapper echo '</div>'; // item_class } echo '<div class="clear"></div>'; echo '</div>'; // close row }
function print_testimonial($item_xml) { $display_type = find_xml_value($item_xml, 'display-type'); if ($display_type == 'Carousel Testimonial') { $additional = 'navigation-on'; } else { $additional = ''; } print_item_header(find_xml_value($item_xml, 'header'), $additional, '', find_xml_value($item_xml, 'icon-class')); $num_fetch = find_xml_value($item_xml, 'num-fetch'); $orderby = find_xml_value($item_xml, 'orderby'); $order = find_xml_value($item_xml, 'order'); $category = find_xml_value($item_xml, 'category', false); $category = $category == 'All' ? '' : $category; $item_size = find_xml_value($item_xml, 'item-size'); $testimonial_row_size = 0; query_posts(array('post_type' => 'testimonial', 'orderby' => $orderby, 'posts_per_page' => $num_fetch, 'order' => $order, 'testimonial-category' => $category)); if ($display_type == 'Static Testimonial') { echo '<div class="gdl-static-testimonial">'; if (have_posts()) { while (have_posts()) { the_post(); $testimonial_row_size = print_item_size($item_size, $testimonial_row_size, 'mb20'); echo '<div class="testimonial-item">'; // testimonial content echo '<div class="testimonial-content">'; the_content(); echo '</div>'; // testimonial author $author = get_the_title(); $position = get_post_meta(get_the_ID(), "testimonial-option-author-position", true); echo '<div class="testimonial-info">'; echo '<span class="testimonial-author">' . $author . '</span>'; if (!empty($position)) { echo ',<span class="testimonial-position"> ' . $position . '</span>'; } echo '</div>'; echo '</div>'; // testimonial item echo '</div>'; // close print_item_size } } echo '<div class="clear"></div>'; echo '</div>'; // close row echo '</div>'; // gdl static testimonial } else { if ($display_type == 'Carousel Testimonial') { echo '<div class="gdl-carousel-testimonial">'; // content echo '<div class="testimonial-item-wrapper">'; if (have_posts()) { while (have_posts()) { the_post(); echo '<div class="testimonial-item">'; // testimonial content echo '<div class="testimonial-content">'; echo '<div class="testimonial-inner-content">'; the_content(); echo '</div>'; echo '</div>'; echo '<div class="testimonial-gimmick"></div><div class="clear"></div>'; // testimonial author $author = get_the_title(); $position = get_post_meta(get_the_ID(), "testimonial-option-author-position", true); echo '<div class="testimonial-info">'; echo '<div class="testimonial-navigation"></div>'; echo '<span class="testimonial-author">' . $author . '</span>'; if (!empty($position)) { echo '<span class="testimonial-position">' . $position . '</span>'; } echo '</div>'; echo '</div>'; // testimonial item } } echo '</div>'; //testimonial-item-wrapper echo '</div>'; } } wp_reset_query(); }
function print_grid2_package($item_class, $item_size, $item_type, $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'); } $package_row_size = 0; $package_size = str_replace(' Grid 2nd Style', '', $item_type); while (have_posts()) { the_post(); $package_row_size = print_item_size($package_size, $package_row_size, $item_class); // package content echo '<div class="package-content-wrapper">'; $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 echo '<div class="package-thumbnail-outer-wrapper" >'; print_package_thumbnail(get_the_ID(), $item_size, $package_ribbon, $package_type_text); echo '<div class="package-title-wrapper" >'; echo '<div class="package-title-overlay"></div>'; echo '<h2 class="package-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>'; // package price if ($package_type == 'Learn More') { $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); 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="discount-price">'; echo get_post_meta(get_the_ID(), 'package-last-minute-widget-text', true); echo '</span>'; echo '</div>'; //package-info-inner } } } echo '</div>'; // package-title-wrapper echo '</div>'; // package-thumbnail-outer-wrapper // 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>'; } } echo '</div>'; // package content wrapper echo '</div>'; // item_class } echo '<div class="clear"></div>'; echo '</div>'; // close row }
function print_page_item($item_xml) { print_item_header(find_xml_value($item_xml, 'header'), '', '', find_xml_value($item_xml, 'icon-class')); global $paged, $gdl_element_id, $port_div_size_num_class, $sidebar_type; if (empty($paged)) { $paged = get_query_var('page') ? get_query_var('page') : 1; } // get the page meta value $port_size = find_xml_value($item_xml, 'item-size'); $item_size = $port_div_size_num_class[$port_size][$sidebar_type]; $num_fetch = find_xml_value($item_xml, 'num-fetch'); $num_excerpt = find_xml_value($item_xml, 'num-excerpt'); query_posts(array('post_type' => 'page', 'paged' => $paged, 'orderby' => 'menu_order', 'order' => 'asc', 'post_parent' => get_the_ID(), 'posts_per_page' => $num_fetch)); echo '<div class="portfolio-item-holder row">'; while (have_posts()) { the_post(); print_item_size($port_size, 0.1, 'portfolio-item mb40'); $thumbnail_id = get_post_thumbnail_id(); if (!empty($thumbnail_id)) { $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size); $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); echo '<div class="portfolio-media-wrapper gdl-image">'; echo '<a class="hover-wrapper" href="' . get_permalink() . '" >'; echo '<span class="portfolio-thumbnail-image-hover">'; echo '<span class="hover-link"></span>'; echo '</span>'; echo '</a>'; echo '<img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/>'; echo '</div>'; //portfolio thumbnail image } $show_title = find_xml_value($item_xml, "show-title") == "Yes" ? true : false; $show_excerpt = find_xml_value($item_xml, "show-excerpt") == "Yes" ? true : false; if ($show_title || $show_excerpt) { echo '<div class="page-context">'; if ($show_title) { echo '<h2 class="page-item-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>'; } if ($show_excerpt) { echo '<div class="page-item-content">' . gdl_get_excerpt($num_excerpt) . '</div>'; } echo '</div>'; // port-thumbnail-contxt } echo '<div class="clear"></div>'; echo '</div>'; // close print_item_size } echo "</div>"; // portfolio-item-holder echo '<div class="clear"></div>'; if (find_xml_value($item_xml, "pagination") == "Yes") { pagination(); } wp_reset_query(); }
print_item_size(find_xml_value($item_xml, 'size'), 'mbtm'); //print_ignition_item($item_xml); echo '</article>'; break; case 'Toggle-Box': print_item_size(find_xml_value($item_xml, 'size'), 'mbtm'); print_toggle_box_item($item_xml); echo '</article>'; break; case 'DonateNow': print_item_size(find_xml_value($item_xml, 'size'), 'mbtm'); print_donate_item($item_xml); echo '</article>'; break; default: print_item_size(find_xml_value($item_xml, 'size'), 'mbtm'); echo '</article>'; break; } } //Content Area if ($page_xml_val->documentElement->childNodes->length == 0) { print_default_content_item(); } } else { print_default_content_item(); } ?> </div> </div> <?php