Reputation: 117
I display the news in a separate block using ACF Post Object. I need to display excerpt and read more button. Now I have displayed some text and a "Read more" button in a post in the admin panel. But they are not displayed, although I display excerpt in the code. How can i do this?
<div class="news">
<div class="news-title">
<span><?php _e('News Feature', 'bluegfx'); ?></span>
<p><?php esc_html_e($select_news->post_title); ?></p>
<pclass="excerpt"><?php esc_html_e($select_news->post_excerpt); ?></p>
</div>
<div class="news-img">
<?php echo get_the_post_thumbnail( $select_news->ID); ?>
</div>
</div>
Upvotes: 0
Views: 252
Reputation: 431
To show read more button you have to use HTML & PHP code like this,
<p><a class="btn btn-primary" href="<?php the_permalink( $select_news->ID ); ?>">Read More</a></p>
Place this code where you want to show the button.
Upvotes: 1