Esempio n. 1
0
            ?>
</a></h2>
		<?php 
        } else {
            ?>
		<h2 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark">(no title)</a></h2>
		<?php 
        }
        ?>

		<div class="post-meta">
			<?php 
        PC_Hooks::pc_post_meta();
        /* Framework hook wrapper */
        ?>
			<p>
				<span class="categories">Category: <?php 
        the_category(', ');
        ?>
</span>

				<?php 
        the_tags('<span class="tags">Tags: ', ', ', '</span>');
        ?>

				<?php 
        global $post;
        ?>
Esempio n. 2
0
    public static function blog_style_recent_posts_widget_loop($args = array())
    {
        ?>

		<div id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class();
        ?>
>

			<div class="post-aside">
			<p class="post-date"><?php 
        the_time('M');
        ?>
<br /><?php 
        the_time('j');
        ?>
</p>

			<p class="author">By <?php 
        the_author_posts_link();
        ?>
</p>
			</div>
			
			<div class="post-content">

			<?php 
        $post_title = get_the_title();
        ?>
			<?php 
        if (!empty($post_title)) {
            ?>
			<h2 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</a></h2>
			<?php 
        } else {
            ?>
			<h2 class="entry-title"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark">(no title)</a></h2>
			<?php 
        }
        ?>

            <div class="post-meta">
                <?php 
        PC_Hooks::pc_post_meta();
        /* Framework hook wrapper */
        ?>
                <p>
					<span class="categories">Category: <?php 
        the_category(', ');
        ?>
</span>

					<?php 
        the_tags('<span class="tags">Tags: ', ', ', '</span>');
        ?>

					<?php 
        if (comments_open()) {
            ?>
					<span class="comments"><a href="<?php 
            the_permalink();
            ?>
#comments" title="<?php 
            the_title_attribute();
            ?>
"><?php 
            comments_number('Leave a Comment', '1 Comment', '% Comments');
            ?>
</a></span>
					<?php 
        }
        ?>
				</p>
            </div><!-- .post-meta -->

			<?php 
        if ($args['spt']) {
            ?>

			<?php 
            if (has_post_thumbnail()) {
                ?>
            <div class="post-thumb">
              <?php 
                $post_id = get_the_ID();
                echo PC_Utility::get_responsive_slider_image($post_id, 'post-thumbnail');
                /* Show post thumbnail image, if one exists. */
                ?>
            </div> <!-- .post-thumb -->
			<?php 
            }
            ?>

			<?php 
        }
        ?>

                <?php 
        global $more;
        $more = 0;
        the_content(' ' . $args['read_more']);
        wp_link_pages(array('before' => '<div class="page-link">', 'after' => '</div>'));
        ?>
            </div> <!-- .post-content -->

        </div> <!-- .post -->

    <?php 
    }
Esempio n. 3
0
    /**
     * Search page loop template part.
     *
     * Used in theme search.php template file.
     *
     * @since 0.1.0
     */
    public static function search_page_loop($s)
    {
        ?>

		<?php 
        if (have_posts()) {
            ?>

		<h2 class="entry-title"><?php 
            _e('Search results...', 'presscoders');
            ?>
</h2>
		
		<?php 
            while (have_posts()) {
                the_post();
                ?>

			<?php 
                // Code to show search terms highlighted
                $keys = explode(" ", $s);
                $title = get_the_title();
                $content = PC_Utility::n_words(wp_strip_all_tags(get_the_content()), 300);
                $title = preg_replace('/(' . implode('|', $keys) . ')/iu', '<span class="search-results">\\0</span>', $title);
                $content = preg_replace('/(' . implode('|', $keys) . ')/iu', '<span class="search-results">\\0</span>', $content);
                ?>

			<div id="post-<?php 
                the_ID();
                ?>
" <?php 
                post_class();
                ?>
>
				
					<h2 class="entry-title"><a href="<?php 
                the_permalink();
                ?>
" rel="bookmark"><?php 
                echo $title;
                ?>
</a></h2>
				
					<?php 
                echo $content;
                ?>

				<div class="post-meta">

					<?php 
                PC_Hooks::pc_post_meta();
                /* Framework hook wrapper */
                ?>

					<p>
						<span class="date"><?php 
                the_time('M j, Y');
                ?>
</span>
						<span class="categories"><?php 
                the_category(', ');
                ?>
</span>

						<?php 
                if (comments_open()) {
                    ?>
						<span class="comments"><a href="<?php 
                    the_permalink();
                    ?>
#comments" title="<?php 
                    the_title_attribute();
                    ?>
"><?php 
                    comments_number('Leave a Comment', '1 Comment', '% Comments');
                    ?>
</a></span>
						<?php 
                }
                ?>
					</p>
				</div><!-- .post-meta -->

			</div> <!-- post-item -->

		<?php 
            }
            // end of the loop.
            ?>

		<?php 
        } else {
            ?>
		
			<div id="post-0" class="post no-results not-found">

				<h2 class="entry-title"><?php 
            _e('No search results found...', 'presscoders');
            ?>
</h2>
				<p><?php 
            _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords. Or, choose from the links below to navigate to another page.', 'presscoders');
            ?>
</p>

				<div style="margin:0 auto;width:300px;"><?php 
            get_search_form();
            ?>
</div>
				
				<div class="widget" style="width:260px;float:left;">
				<h3 class="widget-title"><?php 
            _e('Pages', 'presscoders');
            ?>
</h3>
				<ul>
				<?php 
            wp_list_pages('title_li=');
            ?>
				</ul>
				</div>
				
				<div class="widget" style="width:260px;float:right;">
				<h3 class="widget-title"><?php 
            _e('Post Categories', 'presscoders');
            ?>
</h3>
				<ul>
				<?php 
            //wp_list_cats();
            wp_list_categories();
            ?>
				</ul>
				</div>
			
			</div><!-- #post-0 -->

		<?php 
        }
        ?>

	<?php 
    }