예제 #1
0
/**
 *	アーカイブページのコンテンツヘッダーを表示
 */
function archive_content_header($is_print = false)
{
    $title = archive_title();
    //get_the_archive_description()は<p>でラップされているので、取り除く
    $desc = \is_home() ? \get_bloginfo('description') : \get_the_archive_description();
    $description = \esc_html(\strip_tags($desc));
    $count = \esc_html($GLOBALS['wp_query']->found_posts);
    $attr = $count ? "" : " hidden";
    $html = <<<EOD
<header class="header">
\t<h1><span>{$title}</span></h1>
\t<div class="description">{$description}</div>
\t<div class="count"{$attr}><span class="post-count">{$count}</span>件の記事</div>
</header>

EOD;
    if ($is_print) {
        echo $html;
        return true;
    } else {
        return $html;
    }
}
예제 #2
0
get_header('home');
?>

<div class="academy">
    <div class="academy-top">
        <!-- Top Banner -->
        <div class="banners">
            <div class="container-fluid">
                <div class="row"> 
                    <h1><?php 
//post_type_arecho $the_tax->labels->name;
?>
 
                    <?php 
archive_title();
?>
  <?php 
$taxonomy = get_queried_object();
echo $taxonomy->name;
//var_dump($taxonomy);
?>
 
                    </h1>
                </div>
            </div>
        </div>
    </div>
    <div class="academy-bannerbtm">
        <div class="container-fluid">
            <div class="row ">