Exemplo n.º 1
0
    function odri_categorie_list()
    {
        // Hide category and tag text for pages.
        if ('post' === get_post_type()) {
            /* translators: used between list items, there is a space after the comma */
            $categories_list = get_the_category_list(esc_html__(', ', 'odri'));
            if ($categories_list && odri_categorized_blog()) {
                printf('<span class="cat-links">' . __('<i class="fa fa-folder-open"></i>
 %1$s', 'odri') . '</span>', $categories_list);
                // WPCS: XSS OK.
            }
        }
    }
Exemplo n.º 2
0
?>
</p>

											<?php 
get_search_form();
?>

											<div class="row">
												<div class="col-md-4">
													<?php 
the_widget('WP_Widget_Recent_Posts');
?>
												</div>
												<div class="col-md-4">
													<?php 
if (odri_categorized_blog()) {
    // Only show the widget if site has multiple categories.
    ?>
													<div class="widget widget_categories">
														<h2 class="widget-title"><?php 
    esc_html_e('Most Used Categories', 'odri');
    ?>
</h2>
														<ul>
														<?php 
    wp_list_categories(array('orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10));
    ?>
														</ul>
													</div><!-- .widget -->
											<?php 
}