删除内容结尾处的Post View Count

时间:2015-09-04 09:18:07

标签: javascript php wordpress

我有一个4.3 wordpress系统,我在其上安装了“Orca Theme”。

我注意到我有重复的帖子后点数:

的指示

enter image description here

我想删除第一个指标

我尝试在主题代码中查看amd搜索,但没有找到显示第一个指标的内容。

  

postformat / standart.php:

<?php 
    $thumb_id = get_post_thumbnail_id();
    $thumb_url = wp_get_attachment_image_src($thumb_id, 'postlist', true);
    $title_meta = get_post_meta($post->ID, 'title_style', true);
    $title_meta = ($title_meta == ('banner' || 'title')) ? $title_meta : "standard";
    $category = get_the_category();

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> class="post standard">
    <?php if($title_meta == "banner"){ ?>
        <a class="basicfeature" href="<?php esc_url(the_permalink()); ?>" style="background-image:url('<?php echo esc_url($thumb_url[0]); ?>');"></a>
        <h1><a href="<?php esc_url(the_permalink()); ?>"><?php the_title(); ?></a></h1>
    <?php }elseif($title_meta == "feature"){ ?>
        <a href="<?php esc_url(the_permalink()); ?>" class="largeimage postfeature" style="background-image:url('<?php echo esc_url($thumb_url[0]); ?>');">
            <div class="shadow"></div>
            <h1><?php the_title(); ?></h1>
        </a>
    <?php }else{ ?>
        <h1><a href="<?php esc_url(the_permalink()); ?>"><?php the_title(); ?></a></h1>
    <?php } ?>
    <div class="info">
        <div class="left">
            <i class="issticky fa fa-thumb-tack "></i><a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" class="author"><img src="http://0.gravatar.com/avatar/<?php echo esc_attr(md5(get_the_author_meta('user_email'))); ?>?s=32" alt="author" class="minigravatar"><?php the_author(); ?></a>
        </div>
        <div class="right">
            <a href="<?php esc_url(the_permalink()); ?>" class="date"><i class="fa fa-clock-o"></i><?php echo esc_html(orca_get_time()); ?></a>
            <div class="category"><i class="fa fa-tags"></i>
            <?php if($category){
                echo '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->name.'</a> ';
            } ?>
            </div>
        </div>
    </div>
    <div class="postcontents">
        <?php the_content('', FALSE, ''); ?>
    </div>
    <div class="footer">
        <a href="<?php esc_url(the_permalink()); ?>" class="largesolid orange left"><?php esc_html_e('Read More', 'orcawp'); ?></a>
        <a href="<?php esc_url(the_permalink()); ?>#comments" class="commentsbutton largeoutline right"><i class="fa fa-comments"></i><?php echo esc_html(get_comments_number($post->id)); ?></a>
        <?php if(get_post_meta($post->ID, '_count-views_all', true) != ''){ ?>
            <a href="<?php esc_url(the_permalink()); ?>" class="viewsbutton largeoutline right"><i class="fa fa-bullseye"></i><?php echo esc_html(get_post_meta($post->ID, '_count-views_all', true)); ?></a>
        <?php } ?>
    </div>

1 个答案:

答案 0 :(得分:0)

解决它! 我刚刚取消激活“ BAW Post Views Count ”插件,现在已将其删除!