예제 #1
0
 function Ferret_header_bar()
 {
     if (!is_home()) {
         $r = '<span class = "topbar"><hr /><a class = "homelnk" href="' . esc_url(home_url('/')) . '"><span class="genericon genericon-home"></span></a>';
         if (is_single()) {
             $c = get_the_category();
             $cat_name = $c[0]->name;
             $cat_id = get_cat_ID($cat_name);
             $cat_link = get_category_link($cat_id);
             $r .= ' | <a class = "lik" href = "' . $cat_link . '">' . $cat_name . '</a>';
         }
         $r .= ' | ' . Ferret_title() . '<hr /></span>';
     } else {
         $r = '';
     }
     return $r;
 }
예제 #2
0
<?php

/*
*This is a template to display posts and pages on a given archive.
*
*@since 1.0.0
*
*
*/
?>
<div id = "header-banner">
<h2 class = "round">
<?php 
echo Ferret_title();
?>
</h2>
</div>
<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        get_template_part('lib/content', 'excerpt');
    }
    the_posts_pagination(array('mid_size' => 2, 'prev_text' => __('Back', 'Ferret'), 'next_text' => __('Next', 'Ferret'), 'screen_reader_text' => ' '));
} else {
    get_template_part('lib/content', 'error');
}