美文网首页
WordPress取消文章内页中的特色图像

WordPress取消文章内页中的特色图像

作者: 爱猫猫的老狗 | 来源:发表于2017-11-16 08:45 被阅读0次

wordpress文章特色图像使我们的网站文章列表显得更有个性、更加美观。
但是点击进入文章内页,特色图像就会出现在页面的上面,而且是一半很难看,经过上网搜索,找到了取消它办法:

后台-----外观------编辑--------content-single.php

找到<header class="entry-header">,在这下方有三块 if 语句,删除第一块即可。
<?php
/**
 * Template part for displaying single posts.
 *
 * @package vantage
 * @since vantage 1.0
 * @license GPL 2.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>

    <div class="entry-main">

        <?php do_action('vantage_entry_main_top') ?>

        <?php if ( ( the_title( '', '', false ) && siteorigin_page_setting( 'page_title' ) ) || ( has_post_thumbnail() && siteorigin_setting('blog_featured_image') ) || ( siteorigin_setting( 'blog_post_metadata' ) && get_post_type() == 'post' ) ) : ?>
            <header class="entry-header">
                                    //就是这里,我几经删掉了!
                                    //就是这里,我几经删掉了!
                                    //就是这里,我几经删掉了!      

                <?php if ( the_title( '', '', false ) && siteorigin_page_setting( 'page_title' ) ) : ?>
                    <h1 class="entry-title"><?php the_title(); ?></h1>
                <?php endif; ?>

                <?php if ( siteorigin_setting( 'blog_post_metadata' ) && get_post_type() == 'post' ) : ?>
                    <div class="entry-meta">
                        <?php vantage_posted_on(); ?>
                    </div><!-- .entry-meta -->
                <?php endif; ?>

            </header><!-- .entry-header -->
        <?php endif; ?>

        <div class="entry-content">
            <?php the_content(); ?>
            <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'vantage' ), 'after' => '</div>' ) ); ?>
        </div><!-- .entry-content -->

        <?php if( vantage_get_post_categories() && ! is_singular( 'jetpack-testimonial' ) ) : ?>
            <div class="entry-categories">
                <?php echo vantage_get_post_categories() ?>
            </div>
        <?php endif; ?>

        <?php if ( is_singular() && siteorigin_setting( 'blog_author_box' ) ) vantage_author_box( $post ); ?>

        <?php do_action('vantage_entry_main_bottom') ?>

    </div>

</article><!-- #post-<?php the_ID(); ?> -->

相关文章

网友评论

      本文标题:WordPress取消文章内页中的特色图像

      本文链接:https://www.haomeiwen.com/subject/cuikvxtx.html