Example #1
0
				<div class="l-gutter20 l-gutter20__bl"></div>

				<div class="l-box w180 va-btm">
					<table>
								<tbody><tr>
							<td class="va-btm">
								<div class="daisuBox subTxt txt--sub">
                                <span>掲載台数</span><a class="daisu" href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
"><?php 
        $cat_id = get_cat_id_by_name(get_the_title());
        $cat = get_category($cat_id);
        echo $cat->count;
        ?>
</a>台

								</div>
							</td>
						</tr>
					</tbody></table>
				</div>
			</div><!-- /.l-wrap -->
		</div>

<?php 
    }
Example #2
0
<!-- サイドバー -->
<div class="l-sideColumn">
<?php 
wp_reset_query();
?>

  <section class="l-seclv1 sideBar">
    <h2 class="hd2nd">在庫一覧</h2>
    <div class="sideBar__contents mb10">
<?php 
$arg = array("post_type" => "post", "posts_per_page" => 5, "cat" => get_cat_id_by_name(get_the_title()));
query_posts($arg);
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
        <div class="sideBar__caset">
            <div class="mb5"><span class="label label--new">NEW</span></div>
            <div class="l-wrap--fixed mb10">
          <div class="l-box">
          <p class="note"><?php 
        echo get_post_meta($post->ID, "car-model", true);
        ?>
</p>
          <p class="txt lh12 h2_5em"><a href="<?php 
        the_permalink();
        ?>
"><?php 
        echo mb_substr(get_the_title(), 0, 25);
        ?>
...</a></p>