Exemple #1
0
        function extension_render_content()
        {
            add_filter('excerpt_length', array(&$this, 'excerpt_length'));
            add_filter('excerpt_more', array(&$this, 'excerpt_more'));
            ?>
			<?php 
            if (have_posts()) {
                ?>
				<div class="loop">
					<div class="loop-content">
						<?php 
                while (have_posts()) {
                    // the loop
                    ?>
							<?php 
                    the_post();
                    ?>
							
							<div id="post-<?php 
                    the_ID();
                    ?>
" <?php 
                    post_class();
                    ?>
>
								<div class="entry-content teasers">
									<?php 
                    if (has_post_thumbnail()) {
                        ?>
										<a href="<?php 
                        the_permalink();
                        ?>
" class="teasers-thumb-wrapper">
											<?php 
                        the_post_thumbnail('it-teaser-thumb', array('class' => 'alignright teaser-thumb'));
                        ?>
										</a>
									<?php 
                    } else {
                        ?>
										<?php 
                        edit_post_link('<img width="150" height="200" src="' . $this->_base_url . '/images/no-feature-image.jpg" class="alignright teaser-thumb no-thumb" />', '<div class="teasers-thumb-wrapper">', '</div>');
                        ?>
									<?php 
                    }
                    ?>
									
									<h3 class="entry-title"><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h3>
									
									<div class="entry-meta">
										<?php 
                    printf(__('Posted on %s', 'it-l10n-Builder-Madison'), '<span class="the_date">' . get_the_date() . '</span>');
                    ?>
										<?php 
                    printf(__('by %s', 'it-l10n-Builder-Madison'), '<span class="author">' . builder_get_author_link() . '</span>');
                    ?>
										<?php 
                    do_action('builder_comments_popup_link', '<span class="comments"> | ', '</span>', __('%s Comments', 'it-l10n-Builder-Madison'), __('0', 'it-l10n-Builder-Madison'), __('1', 'it-l10n-Builder-Madison'), __('%', 'it-l10n-Builder-Madison'));
                    ?>
									</div>
									<?php 
                    the_excerpt();
                    ?>
									
								</div>
							</div>
							<!-- end .post -->
						<?php 
                }
                // end of one post
                ?>
					</div>
					<!-- Previous/Next page navigation -->
					<div class="loop-footer">
						<div class="loop-utility clearfix">
							<div class="alignleft"><?php 
                previous_posts_link(__('&laquo; Previous Page', 'it-l10n-Builder-Madison'));
                ?>
</div>
							<div class="alignright"><?php 
                next_posts_link(__('Next Page &raquo;', 'it-l10n-Builder-Madison'));
                ?>
</div>
						</div>
					</div>
				</div>
			<?php 
            } else {
                // do not delete
                ?>
				<?php 
                do_action('builder_template_show_not_found');
                ?>
			<?php 
            }
            // do not delete
            ?>
		<?php 
            remove_filter('excerpt_length', array(&$this, 'excerpt_length'));
            remove_filter('excerpt_more', array(&$this, 'excerpt_more'));
        }
Exemple #2
0
        function extension_render_content()
        {
            global $wp_query, $paged, $post_organizer, $more, $post;
            // Removing the default more link.
            $more = 0;
            add_filter('excerpt_length', array(&$this, 'excerpt_length'));
            add_filter('excerpt_more', array(&$this, 'excerpt_more'));
            $post_organizer = array();
            ?>
			<div class="loop">
				<?php 
            $args = array('posts_per_page' => 6, 'order' => 'date', 'meta_key' => '_thumbnail_id');
            $args = wp_parse_args($args, $wp_query->query);
            unset($args['paged']);
            $posts = get_posts($args);
            ?>
				<?php 
            if (get_query_var('paged') <= 1) {
                // This calls the slider only on the front page.
                ?>
					<div class="loop-header">
						<div id="slides">
							<div class="slides_container slides-thumb-wrapper">
								<?php 
                foreach ($posts as $post) {
                    ?>
									<?php 
                    setup_postdata($post);
                    ?>
									<?php 
                    array_push($post_organizer, $post->ID);
                    ?>

									<div class="slide">
										<?php 
                    if (has_post_thumbnail()) {
                        ?>
											<a href="<?php 
                        the_permalink();
                        ?>
">
												<?php 
                        the_post_thumbnail('it-slider-thumb');
                        ?>
											</a>
										<?php 
                    } else {
                        ?>
											<?php 
                        edit_post_link('Add a feature image', '<img width="615" height="300" src="' . $this->_base_url . '/images/it-slider-thumb.jpg" class="it-slider-thumb no-thumb" /></a><span class="add_feature_image">', '</span>');
                        ?>
										<?php 
                    }
                    ?>

										<div class="caption entry-meta" style="bottom:0">
											<p><?php 
                    the_title();
                    ?>
</p>
										</div>
									</div>
								<?php 
                }
                // end of one post
                ?>
							</div>
						</div>
					</div>
				<?php 
            } else {
                foreach ($posts as $post) {
                    array_push($post_organizer, $post->ID);
                }
                ?>
				<?php 
            }
            ?>
				<?php 
            // this is for the second query
            $temp = $wp_query;
            $paged = get_query_var('paged') ? get_query_var('paged') : 1;
            $posts_per_page = get_option('posts_per_page');
            $my_offset = 6;
            $args = array('paged' => get_query_var('paged'), 'posts_per_page' => $posts_per_page, 'numberposts' => $posts_per_page, 'post__not_in' => $post_organizer);
            $args = wp_parse_args($args, $wp_query->query);
            query_posts($args);
            $total_posts = $posts_per_page * $wp_query->max_num_pages - $my_offset;
            $max_num_pages = round($total_posts / $posts_per_page);
            ?>
				<?php 
            if (have_posts()) {
                ?>
					<div class="loop-content older-posts">
						<?php 
                while (have_posts()) {
                    the_post();
                    ?>
							<div id="post-<?php 
                    the_ID();
                    ?>
" <?php 
                    post_class('clearfix');
                    ?>
>

								<div class="featured-image-wrapper">

									<?php 
                    if (has_post_thumbnail()) {
                        ?>
											<a href="<?php 
                        the_permalink();
                        ?>
" class="index-thumb-wrapper">
												<?php 
                        the_post_thumbnail('it-teaser-thumb', array('class' => 'alignleft'));
                        ?>
											</a>
										<?php 
                    } else {
                        ?>

									<?php 
                    }
                    ?>

								</div>
								<div class="content-wrapper">

									<h3 class="entry-title"><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h3>
									<div class="entry-content index">
										<?php 
                    the_excerpt();
                    ?>
									</div>
									<div class="entry-footer">
										<div class="entry-meta">
											<?php 
                    printf(__('Posted on %s', 'it-l10n-Builder-Madison'), '<span class="the_date">' . get_the_date() . '</span>');
                    ?>
											<?php 
                    printf(__('by %s', 'it-l10n-Builder-Madison'), '<span class="author">' . builder_get_author_link() . '</span>');
                    ?>
											<?php 
                    do_action('builder_comments_popup_link', '<span class="comments">', '</span>', __('%s Comments', 'it-l10n-Builder-Madison'), __('0', 'it-l10n-Builder-Madison'), __('1', 'it-l10n-Builder-Madison'), __('%', 'it-l10n-Builder-Madison'));
                    ?>
										</div>
									</div>

								</div>
							</div>
							<!-- end .post -->
						<?php 
                }
                ?>
					</div>

					<div class="loop-footer">
						<div class="loop-utility clearfix">
							<div class="alignleft"><?php 
                previous_posts_link(__('&larr; Previous Page', 'it-l10n-Builder-Madison'));
                ?>
</div>
							<div class="alignright"><?php 
                next_posts_link(__('Next Page &rarr;', 'it-l10n-Builder-Madison'), $max_num_pages);
                ?>
</div>
						</div>
					</div>
				</div>
			<?php 
            } else {
                // do not delete
                ?>
				<?php 
                do_action('builder_template_show_not_found');
                ?>
			<?php 
            }
            // do not delete
            ?>
		<?php 
            $wp_query = null;
            $wp_query = $temp;
            remove_filter('excerpt_length', array(&$this, 'excerpt_length'));
            remove_filter('excerpt_more', array(&$this, 'excerpt_more'));
        }
post_class();
?>
>

	<div class="entry-header clearfix">

	<h3 class="entry-title">
		<?php 
the_title();
?>
	</h3>

	<!-- meta, and date info -->
	<div class="entry-meta">
		<?php 
printf(__('Posted by %s on', 'it-l10n-Builder-Madison'), '<span class="author">' . builder_get_author_link() . '</span>');
?>
	</div>

	<div class="entry-meta date">
			<span>&nbsp;<?php 
echo get_the_date();
?>
</span>
	</div>

	</div>
	<!-- post content -->
	<div class="entry-content clearfix">
		<?php 
the_content(__('Read More &rarr;', 'it-l10n-Builder-Madison'));
Exemple #4
0
<div id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>

	<div class="entry-header clearfix">

	<!-- meta, and date info -->
	<div class="entry-meta">
		<?php 
printf(__('Posted by %s', 'it-l10n-Builder-Cohen'), '<span class="author">' . builder_get_author_link() . '</span>&nbsp;');
?>
	</div>

	<div class="entry-meta date"> on
		<a href="<?php 
the_permalink();
?>
">
			<span><?php 
echo get_the_date();
?>
</span>
		</a>
	</div>

	</div>
	<!-- post content -->
Exemple #5
0
function render_content()
{
    $show_paging = false;
    ?>
	<div class="loop">
		<div class="loop-header">
			<h4 class="loop-title">
				<?php 
    $title = sprintf(__('Search Results for "<em>%s</em>"', 'it-l10n-Builder-Paige'), get_search_query());
    if (is_paged()) {
        printf('%s &ndash; Page %d', $title, get_query_var('paged'));
    } else {
        echo $title;
    }
    ?>
			</h4>
		</div>
		
		<div class="loop-content">
			<?php 
    if (have_posts()) {
        ?>
				<?php 
        $show_paging = true;
        ?>
				<?php 
        while (have_posts()) {
            // The Loop
            ?>
					<?php 
            the_post();
            ?>
					
					<div id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class();
            ?>
>
						<!-- title, meta, and date info -->
						<div class="entry-header clearfix">
							<h3 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
							
							<?php 
            // Do not print author, comments, or date information for pages
            ?>
							<?php 
            if ('page' !== $GLOBALS['post']->post_type) {
                ?>
								<div class="entry-meta">
									<?php 
                printf(__('By %s', 'it-l10n-Builder-Paige'), '<span class="author">' . builder_get_author_link() . '</span>');
                ?>
									<?php 
                do_action('builder_comments_popup_link', '<span class="comments">&middot; ', '</span>', __('Comments %s', 'it-l10n-Builder-Paige'), __('(0)', 'it-l10n-Builder-Paige'), __('(1)', 'it-l10n-Builder-Paige'), __('(%)', 'it-l10n-Builder-Paige'));
                ?>
								</div>
								
								<div class="entry-meta date">
									<span class="weekday"><?php 
                the_time('l');
                ?>
<span class="weekday-comma">,</span></span>
									<span class="month"><?php 
                the_time('F');
                ?>
</span>
									<span class="day"><?php 
                the_time('j');
                ?>
<span class="day-suffix"><?php 
                the_time('S');
                ?>
</span><span class="day-comma">,</span></span>
									<span class="year"><?php 
                the_time('Y');
                ?>
</span>
								</div>
							<?php 
            }
            ?>
						</div>
						
						<!-- post content -->
						<div class="entry-content clearfix">
							<?php 
            the_excerpt();
            ?>
						</div>
						
						<?php 
            // Do not print category, tag, or comment information for pages
            ?>
						<?php 
            if ('page' !== $GLOBALS['post']->post_type) {
                ?>
							<!-- categories, tags and comments -->
							<div class="entry-footer clearfix">
								<?php 
                do_action('builder_comments_popup_link', '<div class="entry-meta alignright"><span class="comments">', '</span></div>', __('Comments %s', 'it-l10n-Builder-Paige'), __('(0)', 'it-l10n-Builder-Paige'), __('(1)', 'it-l10n-Builder-Paige'), __('(%)', 'it-l10n-Builder-Paige'));
                ?>
								<div class="entry-meta alignleft">
									<div class="categories"><?php 
                printf(__('Categories : %s', 'it-l10n-Builder-Paige'), get_the_category_list(', '));
                ?>
</div>
									<?php 
                the_tags('<div class="tags">' . __('Tags : ', 'it-l10n-Builder-Paige'), ', ', '</div>');
                ?>
								</div>
							</div>
						<?php 
            }
            ?>
					</div>
					<!-- end .post -->
					
					<?php 
            comments_template();
            // include comments template
            ?>
				<?php 
        }
        // end of one post
        ?>
			<?php 
    } else {
        // do not delete
        ?>
				<div class="hentry">
					<div class="entry-content">
						<p><?php 
        _e('No results found.', 'it-l10n-Builder-Paige');
        ?>
</p>
						
						<?php 
        get_search_form();
        ?>
					</div>
				</div>
			<?php 
    }
    // do not delete
    ?>
		</div>
		
		<?php 
    if ($show_paging) {
        ?>
			<div class="loop-footer">
				<!-- Previous/Next page navigation -->
				<div class="loop-utility clearfix">
					<div class="alignleft"><?php 
        previous_posts_link(__('&laquo; Previous Page', 'it-l10n-Builder-Paige'));
        ?>
</div>
					<div class="alignright"><?php 
        next_posts_link(__('Next Page &raquo;', 'it-l10n-Builder-Paige'));
        ?>
</div>
				</div>
			</div>
		<?php 
    }
    ?>
	</div>
<?php 
}
Exemple #6
0
" <?php 
        post_class();
        ?>
>
							<!-- title, meta, and date info -->
							<div class="entry-header clearfix">
								<h3 class="entry-title"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
								<div class="entry-meta">
									<?php 
        printf(__('By %s', 'it-l10n-Builder-Threads'), '<span class="meta-author">' . builder_get_author_link() . '</span>');
        do_action('builder_comments_popup_link', '<span class="meta-comments">&middot; ', '</span>', __('Comments %s', 'it-l10n-Builder-Threads'), __('(0)', 'it-l10n-Builder-Threads'), __('(1)', 'it-l10n-Builder-Threads'), __('(%)', 'it-l10n-Builder-Threads'));
        ?>
								</div>
						
								<div class="entry-meta date">
									<span class="weekday"><?php 
        the_time('l');
        ?>
<span class="weekday-comma">,</span></span>
									<span class="month"><?php 
        the_time('F');
        ?>
</span>
									<span class="day"><?php 
        the_time('j');
Exemple #7
0
" <?php 
        post_class();
        ?>
>
							<!-- title, meta, and date info -->
							<div class="entry-header clearfix">
								<h3 class="entry-title"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
								<div class="entry-meta">
									<?php 
        printf(__('By %s', 'epl'), '<span class="meta-author">' . builder_get_author_link() . '</span>');
        do_action('builder_comments_popup_link', '<span class="meta-comments">&middot; ', '</span>', __('Comments %s', 'epl'), __('(0)', 'epl'), __('(1)', 'epl'), __('(%)', 'epl'));
        ?>
								</div>
						
								<div class="entry-meta date">
									<span class="weekday"><?php 
        the_time('l');
        ?>
<span class="weekday-comma">,</span></span>
									<span class="month"><?php 
        the_time('F');
        ?>
</span>
									<span class="day"><?php 
        the_time('j');
Exemple #8
0
function render_content()
{
    if (have_posts()) {
        ?>
		<div class="loop">
			<div class="loop-header">
				<?php 
        echo epl_property_author_box();
        ?>
				<h4 class="loop-title">
					<?php 
        the_post();
        if (is_category()) {
            // Category Archive
            $title = sprintf(__('Archive for %s', 'epl'), single_cat_title('', false));
        } else {
            if (is_tag()) {
                // Tag Archive
                $title = sprintf(__('Archive for %s', 'epl'), single_tag_title('', false));
            } else {
                if (is_tax()) {
                    // Tag Archive
                    $title = sprintf(__('Archive for %s', 'epl'), builder_get_tax_term_title());
                } else {
                    if (function_exists('is_post_type_archive') && is_post_type_archive() && function_exists('post_type_archive_title')) {
                        // Post Type Archive
                        $title = post_type_archive_title('', false);
                    } else {
                        if (is_author()) {
                            // Author Archive
                            $title = sprintf(__('Author Archive for %s', 'epl'), get_the_author());
                        } else {
                            if (is_year()) {
                                // Year-Specific Archive
                                $title = sprintf(__('Archive for %s', 'epl'), get_the_time('Y'));
                            } else {
                                if (is_month()) {
                                    // Month-Specific Archive
                                    $title = sprintf(__('Archive for %s', 'epl'), get_the_time('F Y'));
                                } else {
                                    if (is_day()) {
                                        // Day-Specific Archive
                                        $title = sprintf(__('Archive for %s', 'epl'), get_the_date());
                                    } else {
                                        if (is_time()) {
                                            // Time-Specific Archive
                                            $title = __('Time Archive', 'epl');
                                        } else {
                                            // Default catchall just in case
                                            $title = __('Archive', 'epl');
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (is_paged()) {
            printf('%s &ndash; Page %d', $title, get_query_var('paged'));
        } else {
            echo $title;
        }
        rewind_posts();
        ?>
				</h4>
			</div>
			
			<div class="loop-content">
				<?php 
        while (have_posts()) {
            // The Loop
            the_post();
            ?>
					
						<div id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class();
            ?>
>
							<!-- title, meta, and date info -->
							<div class="entry-header clearfix">
								<h3 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
							
								<div class="entry-meta">
									<?php 
            printf(__('By %s', 'epl'), '<span class="meta-author">' . builder_get_author_link() . '</span>');
            ?>
									<?php 
            do_action('builder_comments_popup_link', '<span class="meta-comments">&middot; ', '</span>', __('Comments %s', 'epl'), __('(0)', 'epl'), __('(1)', 'epl'), __('(%)', 'epl'));
            ?>
								</div>
							
								<div class="entry-meta date">
									<span class="weekday"><?php 
            the_time('l');
            ?>
<span class="weekday-comma">,</span></span>
									<span class="month"><?php 
            the_time('F');
            ?>
</span>
									<span class="day"><?php 
            the_time('j');
            ?>
<span class="day-suffix"><?php 
            the_time('S');
            ?>
</span><span class="day-comma">,</span></span>
									<span class="year"><?php 
            the_time('Y');
            ?>
</span>
								</div>
							</div>
						
							<!-- post content -->
							<div class="entry-content clearfix">
								<?php 
            the_excerpt();
            ?>
							</div>
						
							<!-- categories, tags and comments -->
							<div class="entry-footer clearfix">
								<?php 
            do_action('builder_comments_popup_link', '<div class="entry-meta alignright"><span class="comments">', '</span></div>', __('Comments %s', 'epl'), __('(0)', 'epl'), __('(1)', 'epl'), __('(%)', 'epl'));
            ?>
								<div class="entry-meta alignleft">
									<div class="categories"><?php 
            printf(__('Categories : %s', 'epl'), get_the_category_list(', '));
            ?>
</div>
									<?php 
            the_tags('<div class="tags">' . __('Tags : ', 'epl'), ', ', '</div>');
            ?>
								</div>
							</div>
						</div>
						<!-- end .post -->
					
						<?php 
            comments_template();
            // include comments template
        }
        // end of one post
        ?>
			</div>
			
			<div class="loop-footer">
				<!-- Previous/Next page navigation -->
				<div class="loop-utility clearfix">
					<div class="alignleft"><?php 
        previous_posts_link(__('&laquo; Previous Page', 'epl'));
        ?>
</div>
					<div class="alignright"><?php 
        next_posts_link(__('Next Page &raquo;', 'epl'));
        ?>
</div>
				</div>
			</div>
		</div>
		<?php 
    } else {
        // do not delete
        do_action('builder_template_show_not_found');
    }
    // do not delete
}