[Solved] Divi theme Smart Excerpts when using Builder template
-
When you are using Divi Builder template to construct Search Results page, it may be hard to get Smart Excerpts visible for PDF files. It's because Divi developers remade standard excerpting functionality by simple cutting.
Well, you can fix it with small patch.
Just open the file Divi/includes/builder/module/Blog.php and search for line 1814 (approx). You can find the line of code with "truncate_post()" inside. Comment out this line and add the new line below as specified on the screenshot:
![E20200605-081057-001[1].png](/forum/assets/uploads/files/1591326741405-e20200605-081057-001-1.png)
P.S. Different Divi versions may have different line numbers etc.
Have fun!
-
In the newer versions of Divi, the line number should be 1881. Other things as before.
![E20200901-164836-001[1].png](/forum/assets/uploads/files/1598965136694-e20200901-164836-001-1.png)
-
In the old Divi versions (e.g. 2.39.2) you need to edit the
index.phpfile instead.- Open the
index.phpfile in the root of the Divi theme - Locate line
54(or another line around) - Replace
truncate_post (270);bythe_excerpt(); - Save the changed file.
Look the screenshot:
![E20201001-004001-001[1].png](/forum/assets/uploads/files/1601495294098-e20201001-004001-001-1.png)
- Open the
-
In the Divi 4.9.10 the respective line number to patch is 1913.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login