Ejemplo n.º 1
0
    /**
     * Prints HTML with meta information for the categories, tags and comments.
     * Also prints a card with the author's bio.
     */
    function apostrophe_entry_footer()
    {
        // Show categories and tags if we're on a post page
        if ('post' === get_post_type()) {
            $categories_list = get_the_category_list();
            if ($categories_list && apostrophe_categorized_blog()) {
                $apostrophe_tags = $categories_list;
            }
            $tags_list = get_the_tag_list('<ul class="post-tags"><li>', '</li><li>', '</li></ul>');
            if ($tags_list) {
                $apostrophe_tags .= $tags_list;
            }
            if ($apostrophe_tags) {
                echo '<div class="apostrophe-tags">' . wp_kses_post($apostrophe_tags) . '</div>';
            }
        }
        // Show the author's information, only if this blog has multiple authors
        // hide = 1 means I've checked "hide author bio", and the below shouldn't display
        if (is_multi_author() && 1 !== get_theme_mod('apostrophe_hide_author')) {
            ?>
		<div class="author vcard">
		<?php 
            echo get_avatar(get_the_author_meta('ID'), 300);
            ?>
			<h3><a class="url fn n" href="<?php 
            echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
            ?>
"><?php 
            the_author();
            ?>
</a></h3>
			<p class="author-bio"><?php 
            echo wp_kses_post(get_the_author_meta('description', get_the_author_meta('ID')));
            ?>
</p>
		</div><!-- .author -->
		<?php 
        }
    }
Ejemplo n.º 2
0
				<div class="page-content">
					<p><?php 
esc_html_e('It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'apostrophe');
?>
</p>
					<?php 
get_search_form();
?>

					<div class="apostrophe-widget-column">
						<?php 
the_widget('WP_Widget_Recent_Posts');
?>

						<?php 
if (apostrophe_categorized_blog()) {
    // Only show the widget if site has multiple categories.
    ?>
						<div class="widget widget_categories">
							<h2 class="widgettitle"><?php 
    esc_html_e('Most Used Categories', 'apostrophe');
    ?>
</h2>
							<ul>
							<?php 
    wp_list_categories(array('orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10));
    ?>
							</ul>
						</div><!-- .widget -->
						<?php 
}