我试图删除双帖图像

时间:2015-05-29 17:59:45

标签: php css wordpress

当你去:

http://dageniusmarketer.com/

你会看到这些帖子有2张图片。我试图删除底部的那个。

我最初添加了

<?php the_post_thumbnail( $size, $attr ); ?>

主要帖子图片,因为我没有获得我想要的位置,这是在帖子统计数据之上。现在我已将它放在统计数据之上,我仍然拥有原始图像,我想将其删除。

我正在尝试使用课程.wp-image

但这并不能给我任何运气。我只想删除统计数据下面的第二个重复图像,并保留我希望将来写入我的帖子正文的其他任何图像。我该怎么做?

编辑:这是我的PHP代码:

<?php get_header(); ?>
<div id="main">
    <div id="content">

    <?php if (have_posts()) : ?>

        <?php while (have_posts()) : the_post(); ?>

        <!-- item -->
        <div class="item entry" id="post-<?php the_ID(); ?>">
            <div class="itemhead">
                <h1>
                    <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
                </h1>
                <?php the_post_thumbnail( $size, $attr ); ?>
                <div class="postStatsContainer">
                    <div class="postViews">100 Views</div>
                    <div class="slash"></div>
                    <div class="postShares">100 Shares</div>
                    <div class="slash"></div>
                    <div class="postComments">100 Comments</div>
                    <div class="slash"></div>
                    <div class="date"><?php the_time('M jS, Y') ?></div>
                </div>
                <div style="clear: both"></div>
                <!--<div class="readMore_Container">-->                       
                <?php the_content('Read More  &raquo;'); ?>
                <div class="postCounter">
                    <i class="fa fa-pencil-square-o fa-2x"></i>#200
                </div>
                <div class="metadata" style="clear:both;">
                    <div class="TagIcon"></div>
                    Filed under 
                    <span class="category"><?php the_category(', ') ?></span> |
                    <?php edit_post_link('Edit', '', ' | '); ?>
                    <?php comments_popup_link('Comment (0)', ' Comment (1)', 'Comments (%)'); ?>
                </div>
                <div style="clear:both;"></div>
                <div style="clear:both;"></div>
            </div>
        </div>
        <!-- end item -->
        <?php comments_template(); // Get wp-comments.php template ?>
        <?php endwhile; ?>
        <div class="navigation">
            <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
            <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
            <p> </p>
        </div>
    <?php else : ?>
        <h2 class="center">Not Found</h2>
        <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php endif; ?>
    <!-- end content -->
</div>
<div id="primary">
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
</div>
<div id="secondary">
    <?php include(TEMPLATEPATH."/r_sidebar.php");?>
</div>
<?php get_footer(); ?>

0 个答案:

没有答案