I have created custom Post type. Now I am using excerpt to show some limited words in the archive page. but I am showing same posts on the homepage in a content slider (Owl Carousel) which is giving me problem cuz excerpt size.
So, I have decided to use first 160 words of the post to show on the archive page. Instead of Excerpt
Also, I have placed Read more Button and I would like to know how to put the link in that
.
<?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(); ?> -->