function custom_columns($column) { switch ($column) { case 'pj_thumb': if (has_post_thumbnail() != '') { echo get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:75px; height:75px;')); } else { echo '<em>' . __('No Thumbnail', 'cmsmasters') . '</em>'; } break; case 'pj_format': if (get_post_meta(get_the_ID(), 'cmsms_project_format', true) != '') { echo '<p>' . __(ucfirst(get_post_meta(get_the_ID(), 'cmsms_project_format', true)), 'cmsmasters') . '</p>'; } else { echo '<em>' . __('Album', 'cmsmasters') . '</em>'; } break; case 'pj_description': if (has_excerpt() || get_the_content() != '') { theme_excerpt(20); } else { echo '<em>' . __('No Description', 'cmsmasters') . '</em>'; } break; case 'pj_sort_categ': if (get_the_terms(0, 'pj-sort-categs') != '') { $pj_sort_categs = get_the_terms(0, 'pj-sort-categs'); $pj_sort_categs_html = array(); foreach ($pj_sort_categs as $pj_sort_categ) { array_push($pj_sort_categs_html, '<a href="' . get_term_link($pj_sort_categ->slug, 'pj-sort-categs') . '">' . $pj_sort_categ->name . '</a>'); } echo implode($pj_sort_categs_html, ', '); } else { echo '<em>' . __('Uncategorized', 'cmsmasters') . '</em>'; } break; case 'pj_tags': if (get_the_terms(0, 'pj-tags') != '') { $pj_tags = get_the_terms(0, 'pj-tags'); $pj_tag_html = array(); foreach ($pj_tags as $pj_tag) { array_push($pj_tag_html, '<a href="' . get_term_link($pj_tag->slug, 'pj-tags') . '">' . $pj_tag->name . '</a>'); } echo implode($pj_tag_html, ', '); } else { echo '<em>' . __('No Tags', 'cmsmasters') . '</em>'; } break; case 'menu_order': $custom_post = get_post(get_the_ID()); $custom = $custom_post->menu_order; echo $custom; break; } }
function custom_columns($column) { switch ($column) { case 'tl_avatar': if (has_post_thumbnail() != '') { echo get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:75px; height:75px;')); } else { echo '<em>' . __('No Avatar', 'cmsmasters') . '</em>'; } break; case 'tl_description': if (has_excerpt() || get_the_content() != '') { theme_excerpt(20); } else { echo '<em>' . __('No Description', 'cmsmasters') . '</em>'; } break; case 'tl_categs': if (get_the_terms(0, 'tl-categs') != '') { $tl_categs = get_the_terms(0, 'tl-categs'); $tl_categs_html = array(); foreach ($tl_categs as $tl_categ) { array_push($tl_categs_html, '<a href="' . get_term_link($tl_categ->slug, 'tl-categs') . '">' . $tl_categ->name . '</a>'); } echo implode($tl_categs_html, ', '); } else { echo '<em>' . __('Uncategorized', 'cmsmasters') . '</em>'; } break; case 'menu_order': $custom_post = get_post(get_the_ID()); $custom = $custom_post->menu_order; echo $custom; break; } }
the_content(); wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] ')); cmsms_content_composer(get_the_ID()); echo '</div>' . "\n" . '<div class="divider"></div>' . "\n"; } } echo '</div>' . "\n"; $timeline_query = new WP_Query(array('post_type' => 'project', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => -1)); $timeline_array = array(); if ($timeline_query->have_posts()) { while ($timeline_query->have_posts()) { $timeline_query->the_post(); if (!array_key_exists(get_the_date('Y'), $timeline_array)) { $timeline_array[get_the_date('Y')] = array(array(get_permalink(get_the_ID()), cmsms_title(get_the_ID(), false))); } else { $timeline_array[get_the_date('Y')][] = array(get_permalink(get_the_ID()), cmsms_title(get_the_ID(), false)); } } } wp_reset_query(); foreach ($timeline_array as $key => $values) { echo '<h4 class="cmsms_timeline_title">' . $key . '</h4>' . "\n" . '<ul class="cmsms_timeline">' . "\n"; foreach ($values as $value) { echo '<li>' . '<a href="' . $value[0] . '">' . $value[1] . '</a>' . '</li>' . "\n"; } echo '</ul>'; } echo '</section>' . "\n" . '<!-- _________________________ Finish Content _________________________ -->' . "\n\n"; if ($cmsms_layout == 'r_sidebar') { echo "\n" . '<!-- _________________________ Start Sidebar _________________________ -->' . "\n" . '<section id="sidebar" role="complementary">' . "\n"; get_sidebar();
* @subpackage Newgate * @since Newgate 1.0 * * Images Page Template * Created by CMSMasters * */ get_header(); echo '<!--_________________________ Start Content _________________________ -->' . "\n" . '<section id="middle_content" role="main">' . "\n"; if (have_posts()) { the_post(); echo '<div class="entry image-attachment">' . "\n"; $metadata = wp_get_attachment_metadata(); echo '<footer class="entry-meta">'; edit_post_link(__('Edit Media', 'cmsmasters'), '<span class="edit-link fr">', '</span>'); echo '<p>' . __('Published', 'cmsmasters') . ' <abbr class="published" title="' . get_the_date() . '">' . get_the_date() . '</abbr> ' . __('at', 'cmsmasters') . ' ' . $metadata['width'] . '×' . $metadata['height'] . ' ' . __('in', 'cmsmasters') . ' ' . '<a href="' . esc_url(get_permalink($post->post_parent)) . '" title="' . cmsms_title($post->post_parent, false) . '">' . cmsms_title($post->post_parent, false) . '</a>.</p>' . '</footer>' . '<br />' . '<div class="tac">' . cmsms_thumb(get_the_ID(), 'slider-thumb', false, 'img_' . get_the_ID(), true, true, true, false, get_the_ID()) . '</div>' . '<div class="cl"></div>' . '<br />'; ?> <div class="navigation" role="navigation"> <div class="fl"><?php previous_image_link(false, __('← Previous', 'cmsmasters')); ?> </div> <div class="fr"><?php next_image_link(false, __('Next →', 'cmsmasters')); ?> </div> <div class="cl"></div> <br /> </div> <?php echo '</div>' . "\n" . '<div class="divider"></div>';
?> ', sliderItems : '.cmsms_hover_slider_items', thumbWidth : '112', thumbHeight : '50' } ); } ); </script> <div class="cmsms_hover_slider" id="cmsms_hover_slider_<?php the_ID(); ?> "> <ul class="cmsms_hover_slider_items"> <?php foreach ($cmsms_post_images as $cmsms_post_image) { echo "\t\t\t\t\t\t" . '<li>' . "\n\t\t\t\t\t\t\t" . '<figure class="cmsms_hover_slider_full_img">' . "\n\t\t\t\t\t\t\t\t" . wp_get_attachment_image($cmsms_post_image, 'full-thumb', false, array('class' => '', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . "\r\t\t\t\t\t\t\t" . '</figure>' . "\r\t\t\t\t\t\t" . '</li>' . "\r"; } ?> </ul> </div> <?php } else { if (sizeof($cmsms_post_images) == 1) { cmsms_thumb(get_the_ID(), 'full-thumb', false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_post_images[0]); } else { if (sizeof($cmsms_post_images) < 1 && has_post_thumbnail() && $cmsms_post_featured_image_show == 'true' && $cmsms_heading != 'parallax') { cmsms_thumb(get_the_ID(), 'full-thumb', false, 'img_' . get_the_ID(), true, true, true, true, false); } } } }
<article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php $cmsms_testimonial_author = get_post_meta(get_the_ID(), 'cmsms_testimonial_author', true); $cmsms_testimonial_author_link = get_post_meta(get_the_ID(), 'cmsms_testimonial_author_link', true); $cmsms_testimonial_company = get_post_meta(get_the_ID(), 'cmsms_testimonial_company', true); echo '<div class="cl"></div>' . "\n" . '<blockquote>'; the_content(); echo '</blockquote>' . "\n" . '<div class="cmsms_author_wrap">'; if ($cmsms_option[CMSMS_SHORTNAME . '_testimonial_post_author_avatar'] && has_post_thumbnail() != '') { echo '<figure class="tl_author_img">' . get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:70px; height:70px;')); echo '</figure>' . "\n"; } cmsms_tl_descr(get_the_ID(), 'post'); echo '</div><div class="divider"></div>'; echo '<footer class="entry-meta">'; cmsms_post_date('testimonial', 'post'); if (!post_password_required()) { echo cmsms_comments('post', 'testimonial'); } cmsms_tl_cat(get_the_ID(), 'tl-categs', 'post'); echo '</footer>'; ?> </article> <?php if ($cmsms_option[CMSMS_SHORTNAME . '_testimonial_post_nav_box']) {
if ($cmsms_project_columns == 'cmsms_three') { if ($colnumb == 3) { echo '</div><div class="resize">'; $colnumb = 0; } } else { if ($cmsms_project_columns == 'cmsms_four') { if ($colnumb == 4) { echo '</div><div class="resize">'; $colnumb = 0; } } } } } echo '<figure>' . '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="preloader highImg jackbox">' . wp_get_attachment_image($cmsms_project_image, $project_thumb, false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</a>' . '</figure>'; $colnumb++; } echo '</div>'; } elseif (sizeof($cmsms_project_images) == 1 && $cmsms_project_images[0] != '') { echo '<div class="resize">'; cmsms_thumb(get_the_ID(), $project_thumb, false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_project_images[0]); echo '</div>'; } elseif (sizeof($cmsms_project_images) < 1 && has_post_thumbnail() && $cmsms_project_featured_image_show == 'true') { echo '<div class="resize">'; cmsms_thumb(get_the_ID(), $project_thumb, false, 'img_' . get_the_ID(), true, true, true, true, false); echo '</div>'; } cmsmsLike(); ?> </div>
animationEffect : 'slide', animationEasing : 'easeInOutExpo', pauseTime : 0, activeSlide : 1, touchControls : true, pauseOnHover : false, arrowNavigation : false, slidesNavigation : true } ); } ); </script> <div class="shortcode_slideshow_container"> <ul class="shortcode_slideshow_slides responsiveContentSlider"> <?php foreach ($cmsms_project_images as $cmsms_project_image) { echo '<li>' . '<figure>' . wp_get_attachment_image($cmsms_project_image, 'project-slider-thumb-full', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>' . '</li>'; } ?> </ul> </div> </div> </div> <?php } else { if (sizeof($cmsms_project_images) == 1 && $cmsms_project_images[0] != '') { cmsms_thumb(get_the_ID(), 'project-slider-thumb-full', false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_project_images[0]); } else { if (sizeof($cmsms_project_images) < 1 && has_post_thumbnail() && $cmsms_project_featured_image_show == 'true' && $cmsms_heading != 'parallax') { cmsms_thumb(get_the_ID(), 'project-slider-thumb-full', false, 'img_' . get_the_ID(), true, true, true, true, false); } }
animationEffect : 'slide', animationEasing : 'easeInOutExpo', pauseTime : 0, activeSlide : 1, touchControls : true, pauseOnHover : false, arrowNavigation : true, slidesNavigation : true } ); } ); </script> <div class="shortcode_slideshow_container"> <ul class="shortcode_slideshow_slides responsiveContentSlider"> <?php foreach ($cmsms_post_images as $cmsms_post_image) { echo "\t\t\t\t\t\t" . '<li>' . "\n\t\t\t\t\t\t\t" . '<figure>' . "\n\t\t\t\t\t\t\t\t" . wp_get_attachment_image($cmsms_post_image, 'slider-thumb', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . "\r\t\t\t\t\t\t\t" . '</figure>' . "\r\t\t\t\t\t\t" . '</li>' . "\r"; } ?> </ul> </div> </div> </div> <?php } else { if (sizeof($cmsms_post_images) == 1) { cmsms_thumb(get_the_ID(), 'slider-thumb', false, 'img_' . get_the_ID(), true, true, true, true, $cmsms_post_images[0]); } else { if (sizeof($cmsms_post_images) < 1 && has_post_thumbnail() && $cmsms_post_featured_image_show == 'true') { cmsms_thumb(get_the_ID(), 'slider-thumb', false, 'img_' . get_the_ID(), true, true, true, true, false); } }
/** * Post Types Shortcode */ function posttype_shortcode($atts, $content = null) { extract(shortcode_atts(array('post_title' => '', 'post_type' => 'post', 'post_sort' => 'latest', 'post_category' => '', 'post_number' => '3', 'post_slide' => 'false', 'show_images' => 'true', 'show_content' => 'false', 'show_info' => 'false'), $atts)); global $cmsms_layout; $unid = uniqid(); $queryArgs = array('posts_per_page' => $post_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => $post_type); switch ($post_sort) { case 'category': if ($post_type == 'post') { $queryArgs['category_name'] = $post_category; } else { if ($post_type == 'project') { $queryArgs['tax_query'] = array(array('taxonomy' => 'pj-categs', 'field' => 'slug', 'terms' => array($post_category))); } else { if ($post_type == 'testimonial') { $queryArgs['tax_query'] = array(array('taxonomy' => 'tl-categs', 'field' => 'slug', 'terms' => array($post_category))); } } } break; case 'popular': $queryArgs['order'] = 'DESC'; $queryArgs['orderby'] = 'meta_value'; $queryArgs['meta_key'] = 'cmsms_likes'; break; } $col_width = 'one_third'; $col_counter = 0; $posttype_query = new WP_Query($queryArgs); if ($post_slide == 'true') { $out = '<section id="portfolio_shortcode_' . $unid . '" class="post_type_shortcode'; if ($post_type == 'testimonial') { $out .= ' type_testimonial'; } if ($post_title == '') { $post_title = ' '; } $out .= '"><div class="post_type_shortcode_inner"><h2>' . $post_title . '</h2>' . '<script type="text/javascript"> ' . 'jQuery(document).ready(function () { ' . "jQuery('#portfolio_shortcode_{$unid} .post_type_list').cmsmsResponsiveContentSlider( { " . "sliderWidth : '100%', " . "sliderHeight : 'auto', " . 'animationSpeed : 500, ' . "animationEffect : 'slide', " . "animationEasing : 'easeInOutExpo', " . 'pauseTime : 0, ' . 'activeSlide : 1, ' . 'touchControls : false, ' . 'pauseOnHover : false, ' . 'arrowNavigation : true, ' . 'slidesNavigation : false ' . '} ); ' . '} ); ' . '</script>' . '<ul class="post_type_list portfolio_container responsiveContentSlider">' . '<li>'; } else { $out = '<section class="post_type_shortcode">'; if ($post_title != '') { $out .= '<h2>' . $post_title . '</h2>'; } } if ($posttype_query->have_posts()) { while ($posttype_query->have_posts()) { $posttype_query->the_post(); if ($post_type == 'project') { $type = get_post_meta(get_the_ID(), 'cmsms_project_format', true); } else { $type = get_post_format(); } $classes = ''; if ($post_type == 'project') { $new_classes = $col_width . ' format-' . $type; } elseif ($post_type == 'testimonial') { $new_classes = 'one_first'; } else { $new_classes = $col_width; } foreach (get_post_class(array($new_classes)) as $class) { $classes .= ' ' . $class; } if ($post_type != 'testimonial') { if ($post_slide == 'true') { if ($col_counter == 3) { $out .= '</li>' . '<li>'; $col_counter = 0; } } } elseif ($post_slide == 'true') { if ($col_counter == 1) { $out .= '</li>' . '<li>'; $col_counter = 0; } } $out .= '<article class="' . ltrim($classes) . '">'; if ($post_type == 'testimonial') { $cmsms_testimonial_author = get_post_meta(get_the_ID(), 'cmsms_testimonial_author', true); $cmsms_testimonial_author_link = get_post_meta(get_the_ID(), 'cmsms_testimonial_author_link', true); $cmsms_testimonial_company = get_post_meta(get_the_ID(), 'cmsms_testimonial_company', true); } elseif ($post_type == 'project') { $img_number_list = explode(',', str_replace(' ', '', str_replace('img_', '', get_post_meta(get_the_ID(), 'cmsms_project_images', true)))); $cmsms_project_video_link = get_post_meta(get_the_ID(), 'cmsms_project_video_link', true); $cmsms_project_video_links = get_post_meta(get_the_ID(), 'cmsms_project_video_links', true); } else { $img_number_list = explode(',', str_replace(' ', '', str_replace('img_', '', get_post_meta(get_the_ID(), 'cmsms_post_images', true)))); $cmsms_post_image_link = get_post_meta(get_the_ID(), 'cmsms_post_image_link', true); $cmsms_post_aside_text = get_post_meta(get_the_ID(), 'cmsms_post_aside_text', true); $cmsms_post_quote_text = get_post_meta(get_the_ID(), 'cmsms_post_quote_text', true); $cmsms_post_quote_author = get_post_meta(get_the_ID(), 'cmsms_post_quote_author', true); $cmsms_post_link_text = get_post_meta(get_the_ID(), 'cmsms_post_link_text', true); $cmsms_post_link_address = get_post_meta(get_the_ID(), 'cmsms_post_link_address', true); $cmsms_post_video_link = get_post_meta(get_the_ID(), 'cmsms_post_video_link', true); $cmsms_post_video_links = get_post_meta(get_the_ID(), 'cmsms_post_video_links', true); } if ($post_type != 'testimonial') { if ($show_images == 'true') { $out .= '<div class="wrap_project">'; if ($type == 'slider' || $type == 'album' || $type == 'gallery') { if (has_post_thumbnail()) { $out .= '<figure>' . get_the_post_thumbnail(get_the_ID(), 'post-thumbnail', array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>'; } else { if (sizeof($img_number_list) > 0 && !has_post_thumbnail()) { $out .= '<figure>' . wp_get_attachment_image($img_number_list[0], 'post-thumbnail', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>'; } else { $out .= '<figure>' . '<img src="' . get_template_directory_uri() . '/img/PT-gallery.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>'; } } } else { if ($type == 'image' && $cmsms_post_image_link) { $out .= cmsms_thumb(get_the_ID(), 'post-thumbnail', true, false, true, false, true, false, $cmsms_post_image_link); } else { if (has_post_thumbnail()) { $out .= cmsms_thumb(get_the_ID(), 'post-thumbnail', true, false, true, false, true, false, false); } else { $out .= '<figure>' . '<img src="' . get_template_directory_uri() . '/img/PT-' . ($type == 'image' || $type == '' ? 'placeholder' : $type) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>'; } } } $cmsms_imagelink = wp_get_attachment_image_src($img_number_list[0], 'full'); $link_href = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full'); $out .= '<div class="portfolio_rollover">'; if ($type != 'video' && ($cmsms_imagelink != 0 || $cmsms_post_image_link != 0 || has_post_thumbnail())) { if ($post_type == 'project' && ($type == 'slider' || $type == 'album' || $type == 'gallery')) { $out .= '<a href="' . $cmsms_imagelink[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>'; } else { $out .= '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>'; } } else { if ($type == 'video' && ($cmsms_project_video_link != '' || $cmsms_project_video_links != '' || $cmsms_post_video_link != '' || $cmsms_post_video_links != '')) { if ($post_type == 'project') { $out .= '<a href="' . $cmsms_project_video_link . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>'; } else { $out .= '<a href="' . $cmsms_post_video_link . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>'; } } } $out .= '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_link"></a>'; $out .= '</div>'; if (sizeof($img_number_list) > 1) { unset($img_number_list[0]); $out .= '<div class="dn">'; foreach ($img_number_list as $img_number_list_image) { $link_href = wp_get_attachment_image_src($img_number_list_image, 'full'); $out .= '<figure>' . '<a href="' . $link_href[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="preloader highImg jackbox">' . wp_get_attachment_image($img_number_list_image, 'project-thumb-half', false, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</a>' . '</figure>'; } $out .= '</div>'; } $out .= '</div>'; } $out .= '<header class="entry-header">' . '<h4 class="entry-title">' . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . '</h4>'; if ($show_info == 'true') { $out .= '<abbr class="published" title="' . get_the_date() . '">' . get_the_date() . '</abbr>'; } $out .= '</header>'; } else { if ($show_content == 'true') { $out .= '<div class="tl-content_wrap">' . '<div class="tl-content">' . '<blockquote>' . theme_excerpt(60, false) . '</blockquote>' . '</div>' . '</div>'; } if ($show_images == 'true') { if (has_post_thumbnail() != '') { $out .= get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:50px; height:50px;')); } } if ($show_info == 'true') { if ($cmsms_testimonial_author != '' && $cmsms_testimonial_author_link != '') { $out .= '<h6 class="tl_author"><a target="_blank" href="' . $cmsms_testimonial_author_link . '" class="tl_author">' . $cmsms_testimonial_author . '</a></h6>' . "\n"; } elseif ($cmsms_testimonial_author != '' && $cmsms_testimonial_author_link == '') { $out .= '<p class="tl_author">' . $cmsms_testimonial_author . '</p>' . "\n"; } if ($cmsms_testimonial_company != '') { $out .= '<p class="tl_company">' . $cmsms_testimonial_company . '</p>'; } } } $out .= '</article>'; $col_counter++; if ($post_slide == 'false') { if ($col_counter == 3) { $out .= '<div class="cl"></div>'; $col_counter = 0; } } } } if ($post_slide == 'true') { $out .= '</li>' . '</ul>'; } $out .= '<div class="cl"></div>' . '</section>'; wp_reset_postdata(); return $out; }
} ?> <!--_________________________ Start Slider Project _________________________ --> <article id="post-<?php the_ID(); ?> " <?php post_class('format-slider'); ?> data-category="<?php echo $pj_categs; ?> "> <?php if (has_post_thumbnail() && $cmsms_project_featured_image_show == 'true') { echo '<div class="media_box">' . cmsms_thumb(get_the_ID(), $pj_img_size, true, false, true, false, true, false, false) . '</div>' . '<div class="project_rollover">' . '<div class="project_rollover_inner">'; cmsms_heading(get_the_ID(), 'project', true, 'h5'); cmsms_meta('project', 'page', get_the_ID(), 'pj-sort-categs', 'fullwidth'); echo '</div>' . '</div>'; } else { echo '<div class="media_box">' . '<figure class="preloader">' . '<img src="' . get_template_directory_uri() . '/img/PFP-XL-gallery.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>' . '</div>' . '<div class="project_rollover">' . '<div class="project_rollover_inner">'; cmsms_heading(get_the_ID(), 'project', true, 'h5'); cmsms_meta('project', 'page', get_the_ID(), 'pj-sort-categs', 'fullwidth'); echo '</div>' . '</div>'; } ?> </article> <!--_________________________ Finish Slider Project _________________________ -->
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $latest = isset($instance['latest']) ? $instance['latest'] : true; $popular = isset($instance['popular']) ? $instance['popular'] : true; $recent = isset($instance['recent']) ? $instance['recent'] : true; $number = isset($instance['number']) ? (int) $instance['number'] : ''; $widget_width = isset($instance['widget_width']) ? $instance['widget_width'] : 'one_first'; if (empty($instance['number']) || !($number = absint($instance['number']))) { $number = 3; } elseif ($number < 1) { $number = 1; } elseif ($number > 15) { $number = 15; } echo '<div class="' . $widget_width . '">' . $before_widget; if ($title) { echo $before_title . $title . $after_title; } echo '<div class="tab lpr">' . '<ul class="tabs">'; if ($latest) { echo '<li>' . '<a href="#"><span>' . __('Latest', 'cmsmasters') . '</span></a>' . '</li>'; } if ($popular) { echo '<li>' . '<a href="#"><span>' . __('Popular', 'cmsmasters') . '</span></a>' . '</li>'; } if ($recent) { echo '<li>' . '<a href="#"><span>' . __('Comments', 'cmsmasters') . '</span></a>' . '</li>'; } if (!$latest && !$popular && !$recent) { echo '<li>' . '<a href="#"><span>' . __('Latest', 'cmsmasters') . '</span></a>' . '</li>'; } echo '</ul>' . '<div class="tab_content">'; if ($latest) { $l = new WP_Query(array('posts_per_page' => $number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => 'post')); if ($l->have_posts()) { echo '<div class="tabs_tab tab_latest">' . '<ul>'; while ($l->have_posts()) { $l->the_post(); $pt_format = get_post_format(); $attachments =& get_children(array('post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC')); $post_link_text = get_post_meta(get_the_ID(), 'post_link_text', true); $post_link_link = get_post_meta(get_the_ID(), 'post_link_link', true); echo '<li>'; if ($pt_format == 'image' || $pt_format == 'gallery') { echo '<div class="alignleft">'; if (has_post_thumbnail()) { cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false); } elseif (!has_post_thumbnail() && sizeof($attachments) > 0) { if (isset($att_counter)) { unset($att_counter); } foreach ($attachments as $attachment) { if (!isset($att_counter) && ($att_counter = true)) { cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, $attachment->ID); } } } else { echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == 'image' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>'; } echo '</div>'; } else { echo '<div class="alignleft">'; if (has_post_thumbnail() && $pt_format != 'video') { cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false); } else { echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == '' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>'; } echo '</div>'; } echo '<div class="ovh">'; if ($pt_format != 'aside' && $pt_format != 'link' && $pt_format != 'quote') { echo '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } elseif ($pt_format == 'link') { echo '<a href="' . $post_link_link . '" title="' . $post_link_text . '">' . $post_link_text . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } elseif ($pt_format == 'aside') { echo '<div class="entry-content">'; theme_excerpt(10); echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } elseif ($pt_format == 'quote') { echo '<div class="entry-content">'; theme_excerpt(10); echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } echo '</div>' . '<div class="cl"></div>' . '</li>'; } echo '</ul>' . '</div>'; } wp_reset_postdata(); wp_reset_query(); } if ($popular) { $p = new WP_Query(array('posts_per_page' => $number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => 'post', 'order' => 'DESC', 'orderby' => 'meta_value', 'meta_key' => 'cmsms_likes')); if ($p->have_posts()) { echo '<div class="tabs_tab tab_popular">' . '<ul>'; while ($p->have_posts()) { $p->the_post(); $pt_format = get_post_format(); $attachments =& get_children(array('post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => 'ASC')); $post_link_text = get_post_meta(get_the_ID(), 'post_link_text', true); $post_link_link = get_post_meta(get_the_ID(), 'post_link_link', true); echo '<li>'; if ($pt_format == 'image' || $pt_format == 'gallery') { echo '<div class="alignleft">'; if (has_post_thumbnail()) { cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false); } elseif (!has_post_thumbnail() && sizeof($attachments) > 0) { if (isset($att_counter)) { unset($att_counter); } foreach ($attachments as $attachment) { if (!isset($att_counter) && ($att_counter = true)) { cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, $attachment->ID); } } } else { echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == 'image' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>'; } echo '</div>'; } else { echo '<div class="alignleft">'; if (has_post_thumbnail() && $pt_format != 'video') { cmsms_thumb(get_the_ID(), array(50, 50), true, false, false, false, false, true, false); } else { echo '<figure>' . '<a href="' . get_permalink() . '"' . ' title="' . cmsms_title(get_the_ID(), false) . '">' . '<img src="' . get_template_directory_uri() . '/img/PF-' . ($pt_format == '' ? 'placeholder' : $pt_format) . '.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" style="width:50px; height:50px;" />' . '</a>' . '</figure>'; } echo '</div>'; } echo '<div class="ovh">'; if ($pt_format != 'aside' && $pt_format != 'link' && $pt_format != 'quote') { echo '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } elseif ($pt_format == 'link') { echo '<a href="' . $post_link_link . '" title="' . $post_link_text . '">' . $post_link_text . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } elseif ($pt_format == 'aside') { echo '<div class="entry-content">'; theme_excerpt(10); echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } elseif ($pt_format == 'quote') { echo '<div class="entry-content">'; theme_excerpt(10); echo '</div>' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>'; } echo '</div>' . '<div class="cl"></div>' . '</li>'; } echo '</ul>' . '</div>'; } wp_reset_postdata(); wp_reset_query(); } if ($recent) { $rcomments = get_comments(array('number' => $number, 'post_type' => 'post', 'status' => 'approve')); if ($rcomments) { echo '<div class="tabs_tab tab_comments">' . '<ul>'; foreach ($rcomments as $comment) { $comment_post_ID = $comment->comment_post_ID; $comment_author = $comment->comment_author; $comment_author_url = $comment->comment_author_url; $comment_date = mysql2date('U', $comment->comment_date, false); $comment_content = $comment->comment_content; $comment_array = explode(' ', $comment_content); if (sizeof($comment_array) > 10) { $new_comment_content = ''; for ($i = 0; $i < 10; $i++) { $new_comment_content .= $comment_array[$i] . ' '; } $new_comment_content = trim($new_comment_content) . '...'; } else { $new_comment_content = $comment_content; } echo '<li>' . ($comment_author_url != '' ? '<a href="' . $comment_author_url . '" title="' . $comment_author_url . '" target="_blank">' : '') . $comment_author . ($comment_author_url != '' ? '</a>' : '') . ' <span>' . __('on', 'cmsmasters') . '</span> <a href="' . get_permalink($comment_post_ID) . '#comments" rel="bookmark">' . cmsms_title($comment_post_ID, false) . '</a>' . '<br />' . '<small>' . '<abbr class="published" title="' . get_the_time('d-m-Y') . '">' . human_time_diff($comment_date, current_time('timestamp')) . ' ' . __('ago', 'cmsmasters') . '</abbr>' . '</small>' . '<p>' . $new_comment_content . '</p>' . '</li>'; } echo '</ul>' . '</div>'; } } echo '</div>' . '</div>' . $after_widget . '</div>'; }
/** * @package WordPress * @subpackage Newgate * @since Newgate 1.0 * * Breadcrumbs Function * Created by CMSMasters * */ function breadcrumbs() { global $post; $breadcrumbs = get_post_meta(get_the_ID(), 'cmsms_breadcrumbs', true); $custom_breadcrumbs = get_post_meta(get_the_ID(), 'cmsms_custom_breadcrumbs', true); $homeLink = home_url(); $homeText = __('Home', 'cmsmasters'); $sep = "\n\t" . '<span class="breadcrumbs_sep"> | </span>' . "\n\t"; $maxLength = 30; $year_format = get_the_time('Y'); $month_format = get_the_time('F'); $day_format = get_the_time('d'); $day_full_format = get_the_time('l'); $url_year = get_year_link($year_format); $url_month = get_month_link($year_format, $month_format); echo '<div class="cmsms_breadcrumbs">' . "\n\t" . '<a href="' . $homeLink . '" class="cms_home">' . $homeText . '</a>' . $sep; if ($breadcrumbs == 'custom' && $custom_breadcrumbs != '') { foreach ($custom_breadcrumbs as $custom_breadcrumb) { echo '<a href="' . $custom_breadcrumb[1] . '">' . $custom_breadcrumb[0] . '</a>' . $sep; } echo '<span>' . cmsms_title(get_the_ID(), false) . '</span>'; } elseif ($breadcrumbs != 'disabled') { if (is_single()) { $category = get_the_category(); $num_cat = count($category); if ($num_cat < 1) { echo '<span>' . cmsms_title(get_the_ID(), false) . '</span>'; } else { if ($num_cat >= 1) { echo get_category_parents($category[0], true, $sep) . ' ' . '<span>' . cmsms_title(get_the_ID(), false) . '</span>'; } } } elseif (is_category()) { global $cat; $multiple_cats = get_category_parents($cat, true, $sep); $multiple_cats_array = explode($sep, $multiple_cats); $multiple_cats_num = count($multiple_cats_array); $i = 2; foreach ($multiple_cats_array as $single_cat) { echo $single_cat; if ($i < $multiple_cats_num) { echo $sep; } $i++; } } elseif (is_tag()) { echo single_tag_title('', false); } elseif (is_day()) { echo '<a href="' . $url_year . '">' . $year_format . '</a>' . $sep . '<a href="' . $url_month . '">' . $month_format . '</a>' . $sep . $day_format . ' (' . $day_full_format . ')'; } elseif (is_month()) { echo '<a href="' . $url_year . '">' . $year_format . '</a>' . $sep . $month_format; } elseif (is_year()) { echo $year_format; } elseif (is_search()) { echo '<span>' . __('Search Results for', 'cmsmasters') . "</span>: '" . get_search_query() . "'"; } elseif (is_page() && !$post->post_parent) { echo '<span>' . cmsms_title(get_the_ID(), false) . '</span>'; } elseif (is_page() && $post->post_parent) { $post_array = get_post_ancestors($post); krsort($post_array); foreach ($post_array as $key => $postid) { $post_ids = get_post($postid); $title = $post_ids->post_title; echo '<a href="' . get_permalink($post_ids) . '">' . $title . '</a>' . $sep; } echo '<span>' . cmsms_title(get_the_ID(), false) . '</span>'; } elseif (is_author()) { global $author; $user_info = get_userdata($author); echo $user_info->display_name; } else { if (is_tax()) { echo '<span>' . __('Portfolio Archives', 'cmsmasters') . '</span>'; } else { echo '<span>' . __('No Breadcrumbs', 'cmsmasters') . '</span>'; } } } echo "\n" . '</div>' . "\n"; }
the_content(); wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] ')); cmsms_content_composer(get_the_ID()); echo '</div>' . "\n" . '<div class="divider"></div>' . "\n"; } } echo '</div>' . "\n"; $timeline_query = new WP_Query(array('post_type' => 'project', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => -1)); $timeline_array = array(); if ($timeline_query->have_posts()) { while ($timeline_query->have_posts()) { $timeline_query->the_post(); if (!array_key_exists(get_the_date('Y'), $timeline_array)) { $timeline_array[get_the_date('Y')] = array(array(get_permalink(get_the_ID()), cmsms_title(get_the_ID(), false), theme_excerpt(55, false), get_the_date('F j, Y'), get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:100px; height:100px;')))); } else { $timeline_array[get_the_date('Y')][] = array(get_permalink(get_the_ID()), cmsms_title(get_the_ID(), false), theme_excerpt(55, false), get_the_date('F j, Y'), get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false), 'style' => 'width:100px; height:100px;'))); } } } wp_reset_query(); foreach ($timeline_array as $key => $values) { echo '<div class="wrap_cmsms_timeline">' . "\n" . '<h6 class="cmsms_timeline_title">' . $key . '</h6>' . "\n"; foreach ($values as $value) { echo '<div class="cmsms_timeline">' . '<article>' . '<header class="entry-header cmsms_timeline_header">' . '<abbr class="published cmsms_timeline_date">' . $value[3] . '</abbr>' . '<h5 class="entry-title">' . '<a href="' . $value[0] . '">' . $value[1] . '</a>' . '</h5>' . '<div class="cl"></div>' . '</header>' . '<div class="cmsms_timeline_content">' . '<div class="entry-content">' . $value[2] . '</div>' . '</div>' . '</article>' . '</div>' . "\n"; } echo '</div>'; } echo '</section>' . "\n" . '<!-- _________________________ Finish Content _________________________ -->' . "\n\n"; if ($cmsms_layout == 'r_sidebar') { echo "\n" . '<!-- _________________________ Start Sidebar _________________________ -->' . "\n" . '<section id="sidebar" role="complementary">' . "\n"; get_sidebar();
function cmsms_related($related_box = false, $tgsarray = null, $popular_box = false, $recent_box = false, $related_number = 4, $type = 'post', $taxonomy = null) { if ($related_box && !empty($tgsarray) || $recent_box || $popular_box) { if ($type == 'post') { $r = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'tag__in' => $tgsarray, 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); } elseif ($type == 'testimonial') { $r = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'tag__in' => $tgsarray, 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); } elseif ($type != 'post' && $type != 'testimonial' && $taxonomy) { $r = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'tax_query' => array(array('taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $tgsarray)), 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); } echo '<aside class="related_posts">' . "\n" . '<h5>'; if ($type == 'post') { echo __('More posts', 'cmsmasters'); } elseif ($type == 'testimonial') { echo __('More testimonials', 'cmsmasters'); } else { echo __('More projects', 'cmsmasters'); } echo '</h5>' . "\n" . '<ul>' . "\n\t"; if ($related_box && !empty($tgsarray) && $r->have_posts()) { echo '<li>' . "\n\t\t" . '<a href="#" class="current">' . __('Related', 'cmsmasters') . '</a>' . "\r\t" . '</li>' . "\n\t"; } if ($popular_box) { echo '<li>' . "\n\t\t" . '<a href="#"'; if (!$related_box || empty($tgsarray) || !$r->have_posts()) { echo ' class="current"'; } echo '>' . __('Popular', 'cmsmasters') . '</a>' . "\r\t" . '</li>' . "\n\t"; } if ($recent_box) { echo '<li>' . "\n\t\t" . '<a href="#"'; if ((!$related_box || empty($tgsarray) || !$r->have_posts()) && !$popular_box) { echo ' class="current"'; } echo '>' . __('Latest', 'cmsmasters') . '</a>' . "\r\t" . '</li>' . "\n\t"; } echo '</ul>' . "\n" . '<div class="related_posts_content">' . "\n"; if ($related_box && !empty($tgsarray) && $r->have_posts()) { echo '<div class="related_posts_content_tab" style="display:block;">' . "\n"; if ($type == 'post') { $related = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'tag__in' => $tgsarray, 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); } elseif ($type == 'testimonial') { $related = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'tag__in' => $tgsarray, 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); } elseif ($type != 'post' && $type != 'testimonial' && $taxonomy) { $related = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'tax_query' => array(array('taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $tgsarray)), 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); } if ($related->have_posts()) { $numb = 0; while ($related->have_posts()) { $related->the_post(); $numb++; if ($numb % 2) { echo '<div class="one_half">' . "\n"; } else { echo '<div class="one_half last">' . "\n"; } echo '<div class="rel_post_content">' . "\n"; cmsms_thumb_small(get_the_ID(), $type); echo '<h6>' . "\n\t" . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . "\r" . '</h6>' . "\r" . '</div>' . "\n"; if ($numb % 2) { echo '</div>' . "\n"; } else { echo '</div>' . "\n" . '<div class="cl"></div>' . "\n"; } } } else { echo '<h6>'; if ($type == 'post') { echo __('No Related Posts Found', 'cmsmasters'); } elseif ($type == 'testimonial') { echo __('No Related Testimonials Found', 'cmsmasters'); } else { echo __('No Related Projects Found', 'cmsmasters'); } echo '</h6>' . "\n"; } wp_reset_postdata(); echo '</div>' . "\n"; } if ($popular_box) { echo '<div class="related_posts_content_tab"'; if (!$related_box || empty($tgsarray) || !$r->have_posts()) { echo ' style="display:block;"'; } echo '>' . "\n"; $popular = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'order' => 'DESC', 'orderby' => 'meta_value', 'meta_key' => 'cmsms_likes', 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); if ($popular->have_posts()) { $numb = 0; while ($popular->have_posts()) { $popular->the_post(); $numb++; if ($numb % 2) { echo '<div class="one_half">' . "\n"; } else { echo '<div class="one_half last">' . "\n"; } echo '<div class="rel_post_content">' . "\n"; cmsms_thumb_small(get_the_ID(), $type); echo '<h6>' . "\n\t" . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . "\r" . '</h6>' . "\n" . '</div>' . "\n"; if ($numb % 2) { echo '</div>' . "\n"; } else { echo '</div>' . "\n" . '<div class="cl"></div>' . "\n"; } } } else { echo '<h6>'; if ($type == 'post') { echo __('No Popular Posts Found', 'cmsmasters'); } elseif ($type == 'testimonial') { echo __('No Popular Testimonials Found', 'cmsmasters'); } else { echo __('No Popular Projects Found', 'cmsmasters'); } echo '</h6>' . "\n"; } wp_reset_postdata(); echo '</div>' . "\n"; } if ($recent_box) { echo '<div class="related_posts_content_tab"'; if ((!$related_box || empty($tgsarray) || !$r->have_posts()) && !$popular_box) { echo ' style="display:block;"'; } echo '>' . "\n"; $recent = new WP_Query(array('posts_per_page' => $related_number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post__not_in' => array(get_the_ID()), 'post_type' => $type)); if ($recent->have_posts()) { $numb = 0; while ($recent->have_posts()) { $recent->the_post(); $numb++; if ($numb % 2) { echo '<div class="one_half">' . "\n"; } else { echo '<div class="one_half last">' . "\n"; } echo '<div class="rel_post_content">' . "\n"; cmsms_thumb_small(get_the_ID(), $type); echo '<h6>' . "\n\t" . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '">' . cmsms_title(get_the_ID(), false) . '</a>' . "\r" . '</h6>' . "\n" . '</div>' . "\n"; if ($numb % 2) { echo '</div>' . "\n"; } else { echo '</div><div class="cl"></div>' . "\n"; } } } else { echo '<h6>'; if ($type == 'post') { echo __('No Latest Posts Found', 'cmsmasters'); } elseif ($type == 'testimonial') { echo __('No Latest Testimonials Found', 'cmsmasters'); } else { echo __('No Latest Projects Found', 'cmsmasters'); } echo '</h6>' . "\n"; } wp_reset_postdata(); echo '</div>' . "\n"; } echo '</div>' . "\n" . '</aside>' . "\n"; } }
echo '<div class="portfolio_rollover">' . '<a href="' . $cmsms_imagelink[0] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>' . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_link"></a>' . '</div>'; } elseif ($cmsms_project_video_type == 'selfhosted' && sizeof($cmsms_project_video_links) > 0) { foreach ($cmsms_project_video_links as $cmsms_project_video_link_url) { $video_link[$cmsms_project_video_link_url[0]] = $cmsms_project_video_link_url[1]; } if (has_post_thumbnail()) { echo '<div class="media_box">' . '<figure class="preloader">' . get_the_post_thumbnail(get_the_ID(), $project_thumb, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>' . '</div>'; } else { echo '<div class="media_box">' . '<figure class="preloader">' . '<img src="' . get_template_directory_uri() . '/img/PF-XL-video.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>' . '</div>'; } echo '<div class="portfolio_rollover">' . '<a href="' . $video_link[$cmsms_project_video_link_url[0]] . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>' . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_link"></a>' . '</div>'; } elseif ($cmsms_project_video_type == 'embedded' && $cmsms_project_video_link != '') { if (has_post_thumbnail()) { echo '<div class="media_box">' . '<figure class="preloader">' . get_the_post_thumbnail(get_the_ID(), $project_thumb, array('class' => 'fullwidth', 'alt' => cmsms_title(get_the_ID(), false), 'title' => cmsms_title(get_the_ID(), false))) . '</figure>' . '</div>'; } else { echo '<div class="media_box">' . '<figure class="preloader">' . '<img src="' . get_template_directory_uri() . '/img/PF-XL-video.jpg' . '" alt="' . cmsms_title(get_the_ID(), false) . '" title="' . cmsms_title(get_the_ID(), false) . '" class="fullwidth" />' . '</figure>' . '</div>'; } echo '<div class="portfolio_rollover">' . '<a href="' . $cmsms_project_video_link . '" data-group="img_' . get_the_ID() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_imagelink jackbox"></a>' . '<a href="' . get_permalink() . '" title="' . cmsms_title(get_the_ID(), false) . '" class="cmsms_link"></a>' . '</div>'; } ?> </div> <?php cmsms_heading(get_the_ID(), 'project', true, 'h4'); cmsms_pj_date('page'); cmsms_meta('project', 'page', get_the_ID(), 'pj-sort-categs', 'fullwidth'); cmsms_exc_cont('project'); ?> </article> <!--_________________________ Finish Video Project _________________________ -->