Skip to content

Instantly share code, notes, and snippets.

@juanfra
Last active April 25, 2019 22:03
Show Gist options
  • Save juanfra/e5cbf148b8c2a2dcc47e16378f0b5bcb to your computer and use it in GitHub Desktop.
Save juanfra/e5cbf148b8c2a2dcc47e16378f0b5bcb to your computer and use it in GitHub Desktop.
<?php
//* Do NOT include the opening php tag
add_filter( 'nice_article_meta', 'flatbase_article_meta_custom' );
function flatbase_article_meta_custom( $html ) {
global $nice_options;
if ( is_tax() ) {
ob_start(); ?>
<div class="entry-meta">
<?php if ( isset( $nice_options['nice_views'] ) && nice_bool( $nice_options['nice_views'] ) ) : ?>
<span class="nice-views">
<?php $pageviews = nice_pageviews_count(); ?>
<i class="fa fa-bullseye"></i>
</span>
<?php endif; ?>
<?php if ( isset( $nice_options['nice_reading_time'] ) && nice_bool( $nice_options['nice_reading_time'] ) ) : ?>
<span class="nice-reading-time">
<i class="fa fa-bookmark"></i>
</span>
<?php endif; ?>
<?php if ( isset( $nice_options['nice_likes'] ) && nice_bool( $nice_options['nice_likes'] ) ) : ?>
<a class="nice-like<?php if ( ! nicethemes_likes_can( get_the_ID() ) ) echo ' liked'; ?>" data-id="<?php the_ID(); ?>" href="#" title="<?php _e( 'Like this', 'nicethemes' ); ?>">
<i class="fa fa-heart"></i>
<span class="like-count">
</span>
</a>
<?php endif; ?>
</div>
<?php
$output = ob_get_contents();
ob_end_clean();
$html = $output;
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment