コード例 #1
0
			<h1 class="title"><?php 
        the_title();
        ?>
</h1>
			<h4 class="info cat-links">
				<div class="author-image"><?php 
        author_image($author_id);
        ?>
</div>
				<span class="author"><?php 
        the_author_posts_link();
        ?>
</span>
				<span class="spacer push-spacer">|</span>
				<span class="date"><?php 
        echo the_timestamp_short();
        ?>
</span>
				<span class="spacer">|</span>
				<span class="category"><?php 
        echo '<a href="' . get_term_link($category->slug, 'category') . '">' . $category->name . '</a>';
        ?>
</span>
			</h4>
		</div>
 
</section>
<div class="container main <?php 
        echo $category->slug;
        ?>
">
コード例 #2
0
function classic_post($timestamp = 1, $title = 1, $excerpt = 1, $sc = 0)
{
    global $exclude_posts;
    $id = get_the_ID();
    $exclude_posts = array_merge(array($id), $exclude_posts);
    $category = get_primary_category($id);
    $db_soundcloud = get_post_meta($id, 'db_soundcloud', true);
    $thumb_id = get_post_thumbnail_id();
    $thumb_url = wp_get_attachment_image_src($thumb_id, array(300, 300), true);
    $thumb_url = $thumb_url[0];
    ?>
	<div class="post classic <?php 
    echo $category->slug;
    ?>
">

		<a class="featured-image-link" href="<?php 
    the_permalink();
    ?>
">
			<div class="featured-image cat-border"><div style="background-image:url('<?php 
    echo $thumb_url;
    ?>
');"></div></div>
			<div class="category-tag cat-background"><?php 
    echo $category->name;
    ?>
</div>
		</a>
		<div class="post-bottom">
			<div class="post-meta left"><?php 
    the_author();
    //the_author_posts_link();
    ?>
</div>
			
			<?php 
    if ($timestamp == 1) {
        ?>
				<div class="post-meta right"><?php 
        echo the_timestamp_short();
        ?>
</div>
			<?php 
    }
    ?>
			<?php 
    if ($title == 1) {
        ?>
				<a href="<?php 
        the_permalink();
        ?>
">
					<h3 class="title"><?php 
        the_title();
        ?>
</h3>
				</a>
			<?php 
    }
    ?>
			<?php 
    if ($excerpt == 1) {
        ?>
				<p class="excerpt"><?php 
        echo char_based_excerpt(150);
        ?>
</p>
			<?php 
    }
    ?>
		</div>
		<?php 
    if ($sc == 1) {
        ?>
			<div class="player super_tight">
				<?php 
        if (isset($db_soundcloud) && !empty($db_soundcloud)) {
            soundcloud_player($db_soundcloud, $song_title);
        }
        ?>
			</div>
		<?php 
    }
    ?>
		</div>
<?php 
}