我已经创建了custom Post type. 现在我正在使用excerpt 在存档页中显示一些有限的单词。但我在主页上以content slider (Owl Carousel) 这给我带来了问题,因为excerpt size.
所以,我决定first 160 words of the post 在上显示archive page. 而不是摘录
还有,我已经Read more 巴顿,我想知道如何把链接
。
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="row">
<div class="col-md-3">
<div class="thumbnail alignleft" style="width:100%;">
<?php echo get_the_post_thumbnail(); ?>
</div>
</div>
<div class="col-md-9">
<header class="entry-header article">
<?php
if ( is_singular() ) :
the_title( \'<h1 class="entry-title">\', \'</h1>\' );
else :
the_title( \'<h2 class="entry-title"><a href="\' . esc_url( get_permalink() ) . \'" rel="bookmark">\', \'</a></h2>\' );
endif;
if ( \'post\' === get_post_type() ) : ?>
<div class="entry-meta">
<?php arcvertex_posted_on(); ?>
</div><!-- .entry-meta -->
<?php
endif; ?>
</header><!-- .entry-header -->
<div class="row">
<div class="col-md-12">
<div class="entry-content-article">
<?php echo get_the_excerpt(); ?>
</div><!-- .entry-content -->
<button type="button" class="btn btn-readmore">Read More...</button>
</div>
</div><!-- .Row -->
</div>
</div><!-- .Row -->
<hr class="half-rule-breadcrumb" style="margin-top:10px;" />
<footer class="entry-footer">
<?php arcvertex_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->