Пример #1
0
 * Title Category Visible Overlay
 *
 * @package Total WordPress Theme
 * @subpackage Partials
 * @version 3.3.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Only used for inside position
if ('inside_link' != $position) {
    return;
}
// Get category taxonomy for current post type
$taxonomy = wpex_get_post_type_cat_tax();
// Get terms
if ($taxonomy) {
    $terms = wpex_list_post_terms($taxonomy, $show_links = false, $echo = false);
}
?>

<div class="overlay-title-category-visible theme-overlay">
	<div class="overlay-title-category-visible-inner clr">
		<div class="overlay-title-category-visible-text clr">
			<div class="overlay-title-category-visible-title">
				<?php 
the_title();
?>
			</div>
			<?php 
Пример #2
0
			<?php 
        if ('author' == $block) {
            ?>
				<li class="meta-author"><span class="fa fa-user"></span><span class="vcard author"<?php 
            wpex_schema_markup('author_name');
            ?>
><span class="fn"><?php 
            the_author_posts_link();
            ?>
</span></span></li>
			<?php 
        }
        ?>

			<?php 
        if ('categories' == $block && ($categories = wpex_list_post_terms(wpex_get_post_type_cat_tax(), true, false))) {
            ?>
				<li class="meta-category"><span class="fa fa-folder-o"></span><?php 
            echo $categories;
            ?>
</li>
			<?php 
        }
        ?>

			<?php 
        if ('comments' == $block && comments_open() && !post_password_required()) {
            ?>
				<li class="meta-comments comment-scroll"><span class="fa fa-comment-o"></span><?php 
            comments_popup_link(esc_html__('0 Comments', 'total'), esc_html__('1 Comment', 'total'), esc_html__('% Comments', 'total'), 'comments-link');
            ?>
Пример #3
0
 /**
  * Get taxonomies
  *
  * @since 2.0.0
  */
 private function get_taxonomies()
 {
     if (!empty($this->atts['taxonomy'])) {
         return array($this->atts['taxonomy']);
     } elseif (!empty($this->atts['post_type'])) {
         $tax = wpex_get_post_type_cat_tax($this->atts['post_type']);
         if ($tax) {
             return $this->string_to_array($tax);
         }
     } elseif (!empty($this->atts['taxonomies'])) {
         return $this->string_to_array($this->atts['taxonomies']);
     }
 }
Пример #4
0
/**
 * Helper function returns first category tags
 *
 * @since 2.0.0
 */
function wpex_get_first_term_tag($taxonomy = '')
{
    $taxonomy = $taxonomy ? $taxonomy : wpex_get_post_type_cat_tax(get_post_type());
    $terms = wp_get_post_terms(get_the_ID(), $taxonomy);
    if (!empty($terms) && !is_wp_error($terms)) {
        return wpex_generate_term_tag($terms[0]);
    }
}
Пример #5
0
                        echo get_the_date();
                        ?>
</span></li>

														<li class="meta-author"><span class="fa fa-user"></span><span class="vcard author"><?php 
                        the_author_posts_link();
                        ?>
</span></li>

														<?php 
                        // Display category
                        if ('yes' != $tax_query) {
                            ?>

															<?php 
                            $category = wpex_get_post_type_cat_tax($post_type);
                            ?>

															<?php 
                            if ($category) {
                                ?>
																<li class="meta-category"><span class="fa fa-folder-o"></span><?php 
                                wpex_list_post_terms($category);
                                ?>
</li>
															<?php 
                            }
                            ?>

														<?php 
                        }