WordPress主题制作

  1. 主页
  2. 文档
  3. WordPress主题制作
  4. 模板文件
  5. single模板范例

single模板范例

结构:

Entry Content



<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
    <div class="entry-main">
		<header class="entry-header">
			<h1 class="entry-title"><?php the_title(); ?></h1>
			<div class="entry-meta">
            <?php mytheme_posted_on(); ?>
            </div><!-- .entry-meta -->
		</header><!-- .entry-header -->
    
		<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( mytheme_get_post_categories() && ! is_singular( 'jetpack-testimonial' ) ) : ?>
            <div class="entry-categories">
                <?php echo mytheme_get_post_categories() ?>
            </div>
        <?php endif; ?>

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

        <?php do_action('mytheme_entry_main_bottom') ?>

    </div>

</article><!-- #post-<?php the_ID(); ?> -->
这篇文章对您有用吗?

我们要如何帮助您?