Back to top

Affiliate Link: Looking to Monetize With Ads?? We Personally Use:

Ezoic

Acabado – Fix Post Excerpts To Display Correctly On Homepage

Featured Tiles
As an Amazon Associate we earn from qualifying purchases made on our website. If you make a purchase through links from this website, we may get a small share of the sale from Amazon and other similar affiliate programs. You can read our complete legal information for more details.

VERIFIED STILL NEEDS TO BE MANUALLY FIXED ON VERSION 1.1.5

The recent posts and issues with pulling means that the functions.php pulls from the incorrect source to avoid catching code blocks, etc

If you feel naughty you can go into your FTP, go to Acabado, Functions.php and change the line around line 714 from the following:

function get_excerpt_by_id( $post_id, $button_text = 'Continue Reading' ) {
	 $content = get_the_content( $post_id );
	 $permalink = get_permalink( $post_id);
             
	 $excerpt = strip_tags( $content );
	 $excerpt = substr( $excerpt, 0, 200 );
	 $excerpt = substr( $excerpt, 0, strripos( $excerpt, " " ) );
	 $excerpt = sprintf( '<p>%s...</p><div class="button-container"><a rel="nofollow" class="button reverse" href="%s">%s</a></div>', $excerpt, get_permalink( $post_id ), $button_text );
	 return $excerpt;
 }

Replace the blank line and the strip tags line with the below code which references the excerpt for the information instead of the content itself.

$excerpt = get_the_excerpt( $post_id );
$excerpt = strip_tags( $excerpt ); 

This will then pull an excerpt instead which has resolved the issue on this site.

If you find a post helpful and feel like rewarding my effort with the price of a beer, please donate here

About Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals!
Read More About Me...

My Posts | Website

Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals!
Read More About Me...

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Content