コード例 #1
0
 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;
     }
 }
コード例 #2
0
ファイル: widget_feature.php プロジェクト: kosir/thatcamp-org
function widget_sideFeature()
{
    $options = get_option("widget_sideFeature");
    $numberOf = $options['number'];
    $category = $options['category'];
    $category = "&cat=" . $category;
    $showposts = "posts_per_page=" . $numberOf . $category;
    ?>
    <?php 
    $featuredPosts = new WP_Query();
    $featuredPosts->query($showposts);
    ?>
	<?php 
    $i = 1;
    ?>
    <?php 
    while ($featuredPosts->have_posts()) {
        $featuredPosts->the_post();
        ?>
    <h3 class="side"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
        <div class="meta">
            <?php 
        _e("By", "feed-me-seymour");
        echo " ";
        the_author_posts_link();
        ?>
        </div>
        <div class="storycontent <?php 
        if ($numberOf == $i) {
            echo "noline";
        }
        $i++;
        ?>
">
            <?php 
        theme_excerpt('25');
        ?>
        </div>
	    <?php 
    }
}
コード例 #3
0
 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;
     }
 }
コード例 #4
0
cmsms_meta('post', 'post');
if (!post_password_required()) {
    cmsms_comments('post');
}
?>
		</div>
	</header>
	<?php 
if (!post_password_required()) {
    ?>
		<blockquote>
		<?php 
    if ($cmsms_post_quote_text != '') {
        echo "\t" . '<p>' . str_replace("\n", '<br />', $cmsms_post_quote_text) . '</p>' . "\n";
    } else {
        echo "\t" . '<p>' . theme_excerpt(55, false) . '</p>' . "\n";
    }
    ?>
		</blockquote>
	<?php 
    if ($cmsms_post_quote_author != '') {
        echo '<p class="cmsms_quote_author">' . $cmsms_post_quote_author . '</p>' . "\n";
    }
} else {
    echo '<p>' . __('There is no excerpt because this is a protected post.', 'cmsmasters') . '</p>';
}
?>
	<div class="entry-content">
		<?php 
the_content();
wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] '));
コード例 #5
0
ファイル: aside.php プロジェクト: AlexanderBogdan/poliplast
	<div class="cmsms_info">
		<div class="cmsms_like"><?php 
cmsmsLike();
?>
</div>
	</div>
	<div class="ovh">
		<header class="entry-header">
			<div class="entry-header-inner">
				<span class="cmsms_post_format_img"></span>
				<?php 
if (!post_password_required()) {
    if ($cmsms_post_aside_text != '') {
        echo '<h3>' . $cmsms_post_aside_text . '</h3>' . "\n";
    } else {
        echo '<div class="entry-content">' . theme_excerpt(55, false) . '</div>' . "\n";
    }
} else {
    echo '<p>' . __('There is no excerpt because this is a protected post.', 'cmsmasters') . '</p>';
}
?>
			</div>
			<div class="cmsms_post_info">
				<?php 
cmsms_post_date();
if (!post_password_required()) {
    cmsms_comments();
}
cmsms_meta();
?>
			</div>
コード例 #6
0
<!--_________________________ Start Aside Article _________________________ -->
<article id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class();
        ?>
>
<?php 
        cmsms_tl_cat(get_the_ID(), 'tl-categs', 'page');
        if (!post_password_required()) {
            echo cmsms_comments('page', 'testimonial');
        }
        cmsms_post_date('testimonial', 'page');
        echo '<div class="cl"></div>' . "\n" . '<div class="tl-content_wrap">' . "\n\t" . '<div class="tl-content">' . "\n\t\t" . '<blockquote>' . theme_excerpt(60, false) . '</blockquote>' . "\n\t" . '</div>' . "\n" . '</div>' . "\n";
        if ($cmsms_option[CMSMS_SHORTNAME . '_testimonial_page_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:50px; height:50px;'));
            echo '</figure>' . "\n";
        }
        cmsms_more(get_the_ID(), 'testimonial');
        cmsms_tl_descr(get_the_ID(), 'page');
        ?>
</article>

<!--_________________________ Finish Testimonial Article _________________________ -->
<?php 
    }
    echo '</section>' . "\n";
    pagination();
    echo '</div>' . "\n\t";
コード例 #7
0
/**
 * 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 = '&nbsp;';
        }
        $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;
}
コード例 #8
0
ファイル: widgets.php プロジェクト: AlexanderBogdan/poliplast
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Testimonials', 'cmsmasters') : $instance['title'], $instance, $this->id_base);
     $category = isset($instance['category']) ? $instance['category'] : '';
     $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;
     }
     $queryArgs = array('posts_per_page' => $number, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'post_type' => 'testimonial');
     if ($category != '') {
         $queryArgs['tax_query'] = array(array('taxonomy' => 'tl-categs', 'field' => 'slug', 'terms' => array($category)));
     }
     $lt = new WP_Query($queryArgs);
     if ($lt->have_posts()) {
         echo '<div class="' . $widget_width . '">' . $before_widget . '<script type="text/javascript">' . 'jQuery(document).ready(function () { ' . "jQuery('#" . $args['widget_id'] . " .widget_custom_projects_entries_slides').cmsmsResponsiveContentSlider( { " . "sliderWidth : '100%', " . "sliderHeight : 'auto', " . 'animationSpeed : 500, ' . "animationEffect : 'slide', " . "animationEasing : 'easeInOutExpo', " . 'pauseTime : 7000, ' . 'activeSlide : 1, ' . 'touchControls : true, ' . 'pauseOnHover : false, ' . 'arrowNavigation : true, ' . 'slidesNavigation : false, ' . 'afterSliderLoad : function () { ' . 'if ( ' . "jQuery('#bottom a.sidebar_button_inner').hasClass('active') && " . "jQuery('#bottom').height() !== 0 " . ') { ' . "jQuery(window).trigger('resize');" . '} ' . '}, ' . 'afterSlideChange : function () { ' . 'if ( ' . "jQuery('#bottom a.sidebar_button_inner').hasClass('active') && " . "jQuery('#bottom').height() !== 0 " . ') { ' . "jQuery(window).trigger('resize');" . '} ' . '} ' . '} ); ' . '} ); ' . '</script>' . '<div class="widget_custom_projects_entries_container">';
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         echo '<ul class="widget_custom_projects_entries_slides responsiveContentSlider">';
         while ($lt->have_posts()) {
             $lt->the_post();
             $pj_format = get_post_meta(get_the_ID(), 'pt_format', true);
             $img_number_list = explode(',', str_replace(' ', '', str_replace('img_', '', get_post_meta(get_the_ID(), 'cmsms_project_images', true))));
             echo '<li>' . '<div class="tl-content_wrap">';
             $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);
             if ($cmsms_testimonial_author != '' && $cmsms_testimonial_author_link != '') {
                 echo '<p class="tl_author"><a target="_blank" href="' . $cmsms_testimonial_author_link . '" class="tl_author">' . $cmsms_testimonial_author . '</a></p>' . "\n";
             } elseif ($cmsms_testimonial_author != '' && $cmsms_testimonial_author_link == '') {
                 echo '<p class="tl_author">' . $cmsms_testimonial_author . '</p>' . "\n";
             }
             $cmsms_testimonial_company = get_post_meta(get_the_ID(), 'cmsms_testimonial_company', true);
             if ($cmsms_testimonial_company != '') {
                 echo '<p class="tl_company">' . $cmsms_testimonial_company . '</p>';
             }
             echo '<div class="tl-content">';
             theme_excerpt(20);
             echo '</div>' . '</div>' . '</li>';
         }
         echo '</ul>' . '</div>' . $after_widget . '</div>';
     }
     wp_reset_postdata();
     wp_reset_query();
 }
コード例 #9
0
ファイル: aside.php プロジェクト: AlexanderBogdan/poliplast
?>
</div>
		<?php 
cmsms_post_date('post', 'post');
if (!post_password_required()) {
    cmsms_comments('post');
}
cmsms_meta('post', 'post');
?>
	</header>
	<?php 
if (!post_password_required()) {
    if ($cmsms_post_aside_text != '') {
        echo '<h3 class="entry-content">' . $cmsms_post_aside_text . '</h3>' . "\n";
    } else {
        echo '<h3 class="entry-content">' . theme_excerpt(55, false) . '</h3>' . "\n";
    }
} else {
    echo '<p>' . __('There is no excerpt because this is a protected post.', 'cmsmasters') . '</p>';
}
?>
	<footer class="entry-meta">
		<?php 
echo '<div class="entry-content">' . "\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 "\t\t" . '</div>' . "\n";
cmsms_tags(get_the_ID(), 'post', 'post');
?>
	</footer>
コード例 #10
0
ファイル: index.php プロジェクト: kosir/thatcamp-org
    the_title();
    ?>
</a></h2>
			<div class="storycontent">
				<?php 
    if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
        echo '<a href="' . get_permalink() . '">';
        the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
        echo '</a>';
    } else {
        echo resize(get_option('thumbnail_size_w'), get_option('thumbnail_size_h'));
    }
    ?>
	
                <?php 
    echo theme_excerpt(25);
    ?>
				<p class="contread"><a href="<?php 
    the_permalink();
    ?>
"><?php 
    _e("Read More &raquo;", "feed-me-seymour");
    ?>
</a></p>
			 </div>
		 </div>
	<?php 
}
?>
		</div>
	</div>
コード例 #11
0
ファイル: newsletter.php プロジェクト: JustinHop/fya
            echo resize(get_option('thumbnail_size_w'), get_option('thumbnail_size_h'));
        }
        ?>
			<?php 
        the_title();
        ?>
</a></h2>
	<?php 
        /*<div class="meta">
        		<?php if(theme_option('dates_index')=='on') { echo '<div class="date">'; the_time(get_option('date_format')); echo '</div>'; } ?>
        		 <?php if(theme_option('authors_index')=='on') { _e("By", "magazine-basic"); echo ' '; the_author_posts_link(); } ?> 
        	</div>*/
        ?>
	<div class="clear">&nbsp;</div>
	<div class="storycontent">
		<?php 
        if (theme_option('excerpt_content') == '2') {
            theme_content(__('Read more &raquo;', "magazine-basic"));
        } else {
            theme_excerpt(theme_option('excerpt_one'));
        }
        ?>
	</div>
</div>
<?php 
    }
}
?>

<?php 
get_footer();
コード例 #12
0
ファイル: option3.php プロジェクト: JustinHop/fya
        }
        ?>
        </div>

		<div class="storycontent">
			<?php 
        if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
            echo '<a href="' . get_permalink() . '">';
            the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
            echo '</a>';
        } else {
            echo resize(get_option('thumbnail_size_w'), get_option('thumbnail_size_h'));
        }
        if (theme_option('excerpt_content') == '2') {
            theme_content(__('Read more &raquo;', "magazine-basic"));
        } else {
            theme_excerpt(theme_option('excerpt_three'));
        }
        ?>
		</div>
	 </div>
<?php 
        $x++;
    }
}
if ($x > 4) {
    echo "</div>";
}
?>
</div>
コード例 #13
0
ファイル: search.php プロジェクト: JustinHop/fya
            echo ' ';
            the_author_posts_link();
        }
        ?>
 
        </div>
		<div class="storycontent">
			<?php 
        if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
            echo '<a href="' . get_permalink() . '">';
            the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
            echo '</a>';
        } else {
            echo resize(get_option('thumbnail_size_w'), get_option('thumbnail_size_h'));
        }
        theme_excerpt(55);
        ?>
		</div>
        <p class="meta"><?php 
        the_tags(__("Tags: ", "magazine-basic"), ', ', '<br />');
        ?>
 <?php 
        _e("Posted in", "magazine-basic");
        echo " ";
        the_category(', ');
        ?>
 | <?php 
        edit_post_link(__("Edit", "magazine-basic"), '', ' | ');
        ?>
  <?php 
        comments_popup_link(__('No Comments &#187;', "magazine-basic"), __('1 Comment &#187;', "magazine-basic"), __('% Comments &#187;', "magazine-basic"));
コード例 #14
0
        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();
コード例 #15
0
ファイル: option2.php プロジェクト: JustinHop/fya
            echo ' ';
            the_author_posts_link();
        }
        ?>
 
		</div>

		<div class="storycontent">
			<?php 
        if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
            echo '<a href="' . get_permalink() . '">';
            the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
            echo '</a>';
        } else {
            echo resize(get_option('thumbnail_size_w'), get_option('thumbnail_size_h'));
        }
        if (theme_option('excerpt_content') == '2') {
            theme_content(__('Read more &raquo;', "magazine-basic"));
        } else {
            theme_excerpt(theme_option('excerpt_two'));
        }
        ?>
		</div>
	 </div>
<?php 
        $x++;
    }
}
?>
</div>
コード例 #16
0
ファイル: quote.php プロジェクト: AlexanderBogdan/poliplast
cmsms_post_date('post', 'post');
cmsms_meta('post', 'post');
if (!post_password_required()) {
    cmsms_comments('post');
}
?>
	</header>
	<?php 
if (!post_password_required()) {
    ?>
		<blockquote>
		<?php 
    if ($cmsms_post_quote_text != '') {
        echo "\t" . '<h3>' . str_replace("\n", '<br />', $cmsms_post_quote_text) . '</h3>' . "\n";
    } else {
        echo "\t" . '<h3>' . theme_excerpt(55, false) . '</h3>' . "\n";
    }
    ?>
		</blockquote>
	<?php 
    if ($cmsms_post_quote_author != '') {
        echo '<h6>' . $cmsms_post_quote_author . '</h6>' . "\n";
    }
} else {
    echo '<h6>' . __('There is no excerpt because this is a protected post.', 'cmsmasters') . '</h6>';
}
?>
	<div class="entry-content">
		<?php 
the_content();
wp_link_pages(array('before' => '<div class="subpage_nav" role="navigation">' . '<strong>' . __('Pages', 'cmsmasters') . ':</strong>', 'after' => '</div>' . "\n", 'link_before' => ' [ ', 'link_after' => ' ] '));
コード例 #17
0
    function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
        $sticky = get_option('sticky_posts');
        $par = array("posts_per_page" => $instance['number'], "cat" => $instance['category'], "post__not_in" => $sticky);
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        $featuredPosts = new WP_Query();
        $featuredPosts->query($par);
        ?>
		<?php 
        $i = 1;
        ?>
	    <?php 
        while ($featuredPosts->have_posts()) {
            $featuredPosts->the_post();
            ?>
	    <article id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class('side-featured');
            ?>
>
			<?php 
            if (function_exists('has_post_format') && (has_post_format('aside') || has_post_format('link'))) {
                // new aside || link post format
                // do nothing
            } else {
                $rightcon = '';
                if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
                    echo '<a href="' . get_permalink() . '">';
                    the_post_thumbnail('fifty', array('class' => 'alignleft'));
                    echo '</a>';
                    $rightcon = ' class="content-col"';
                }
                ?>
				<div<?php 
                echo $rightcon;
                ?>
>
				<h2 class="posttitle"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                printf(esc_attr__('Permalink to %s', "presswork"), the_title_attribute('echo=0'));
                ?>
" rel="bookmark"><?php 
                the_title();
                ?>
</a></h2>
				<div class="meta">
					<?php 
                the_time(get_option('date_format'));
                ?>
				</div>
				<?php 
            }
            ?>
			<div class="storycontent">
				<?php 
            if (function_exists('has_post_format') && (has_post_format('aside') || has_post_format('link') || has_post_format('video') || has_post_format('image') || has_post_format('audio'))) {
                // new aside || link || audio || video || image post format
                echo '<div class="pformat clear">';
                the_content('');
                echo '</div>';
            } elseif (function_exists('has_post_format') && has_post_format('gallery')) {
                // new gallery post format
                global $post;
                $images = get_children(array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999));
                if ($images) {
                    $total_images = count($images);
                    $image = array_shift($images);
                    $image_img_tag = wp_get_attachment_image($image->ID, 'full');
                    ?>
					<a class="gallery-thumb" href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    echo $image_img_tag;
                    ?>
</a>
					<p class="gallery-text clear fl"><em><?php 
                    printf(_n('This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, "presswork"), 'href="' . get_permalink() . '" title="' . sprintf(esc_attr__('Permalink to %s', "presswork"), the_title_attribute('echo=0')) . '" rel="bookmark"', number_format_i18n($total_images));
                    ?>
</em>
					</p>
					<?php 
                }
                ?>
					<?php 
            } else {
                theme_excerpt(15);
                ?>
				<?php 
            }
            ?>
			</div> 
			<?php 
            if (function_exists('has_post_format') && (has_post_format('aside') || has_post_format('link'))) {
                // new aside || link post format
                // do nothing
            } else {
                echo '</div>';
            }
            ?>
		</article>
	    <?php 
        }
        echo $after_widget;
    }