コード例 #1
0
ファイル: tapestries.php プロジェクト: heikkiket/SKP-Helsinki
    function arras_tapestry_traditional($dep = '', $taxonomy)
    {
        ?>
		<div <?php 
        arras_single_post_class();
        ?>
>
			<?php 
        arras_postheader();
        ?>
			<div class="entry-content clearfix"><?php 
        the_content(__('<p>Read the rest of this entry &raquo;</p>', 'arras'));
        ?>
</div>
			<?php 
        arras_postfooter();
        ?>
		</div>
		<?php 
    }
コード例 #2
0
function arras_get_posts($page_type, $query = null)
{
    global $post, $wp_query;
    if (!$query) {
        $query = $wp_query;
    }
    if ($query->have_posts()) {
        ?>

<?php 
        if (arras_get_option($page_type . '_display') == 'traditional') {
            ?>
	<div class="traditional hfeed">
	<?php 
            while ($query->have_posts()) {
                $query->the_post();
                ?>
	<div <?php 
                arras_single_post_class();
                ?>
>
        <?php 
                arras_postheader();
                ?>
		<div class="entry-content clearfix"><?php 
                the_content(__('<p>Read the rest of this entry &raquo;</p>', 'arras'));
                ?>
</div>
		<?php 
                arras_postfooter();
                ?>
    </div>
	<?php 
            }
            ?>
	</div><!-- .traditional -->
<?php 
        } elseif (arras_get_option($page_type . '_display') == 'line') {
            ?>
	<ul class="hfeed posts-line clearfix">
	<?php 
            while ($query->have_posts()) {
                $query->the_post();
                ?>
	<li <?php 
                arras_post_class();
                ?>
>
	
		<?php 
                if (!is_archive()) {
                    ?>
		<span class="entry-cat">
			<?php 
                    $cats = get_the_category();
                    if (arras_get_option('news_cat')) {
                        echo $cats[1]->cat_name;
                    } else {
                        echo $cats[0]->cat_name;
                    }
                    ?>
		</span>
		<?php 
                }
                ?>
		
		<h3 class="entry-title"><a rel="bookmark" href="<?php 
                the_permalink();
                ?>
" title="<?php 
                printf(__('Permalink to %s', 'arras'), get_the_title());
                ?>
"><?php 
                the_title();
                ?>
</a></h3>
		<span class="entry-comments"><?php 
                comments_number();
                ?>
</span>
	</li>
	<?php 
            }
            ?>
	</ul>
<?php 
        } else {
            ?>
	<ul class="hfeed posts-<?php 
            echo arras_get_option($page_type . '_display');
            ?>
 clearfix">
	<?php 
            while ($query->have_posts()) {
                $query->the_post();
                ?>
	<li <?php 
                arras_post_class();
                ?>
>
		
		<?php 
                arras_newsheader($page_type);
                ?>
		<div class="entry-summary">
			<?php 
                if (arras_get_option($page_type . '_display') == 'default') {
                    //echo arras_strip_content(get_the_excerpt(), 20);
                    echo get_the_excerpt();
                } else {
                    echo get_the_excerpt();
                    ?>
				<p class="quick-read-more"><a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    printf(__('Permalink to %s', 'arras'), get_the_title());
                    ?>
">
				<?php 
                    _e('Read More', 'arras');
                    ?>
				</a></p>
				<?php 
                }
                ?>
		</div>
		<?php 
                arras_newsfooter($page_type);
                ?>
		
	</li>
	<?php 
            }
            ?>
	</ul>
<?php 
        }
        ?>

<?php 
    }
    ?>

<?php 
}
コード例 #3
0
arras_above_content();
?>

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
      <?php 
        arras_above_post();
        ?>
      <div id="post-<?php 
        the_ID();
        ?>
" <?php 
        arras_single_post_class();
        ?>
>

        <?php 
        arras_postheader();
        ?>
        
        <div class="entry-content clearfix">
            <?php 
        the_content(__('<p>Read the rest of this entry &raquo;</p>', 'arras'));
        ?>
  
        <?php 
        wp_link_pages(array('before' => __('<p><strong>Pages:</strong> ', 'arras'), 'after' => '</p>', 'next_or_number' => 'number'));
        ?>