How To Add An Excerpt And Read More Button To Projects In The Divi Portfolio Module
Вставка
- Опубліковано 9 лют 2025
- In this tutorial I will show you how to add an excerpt text and read more button to the Divi Portfolio module projects grid!
Blog Post + Snippets: www.peeayecrea...
If you have searched the internet for this, you did not find the answer - until now! In this tutorial, I am every excited to show you how to add an excerpt text and read more button to the projects in the Divi Portfolio module. I will provide a PHP code snippet to you that you can easily customize with a lot of options, so let's get started with this exciting solution to a very common request in Divi.
Become a member of our Divi Adventure Club!
www.peeayecrea...
Join The Divi Teacher Facebook group: / thediviteacher
Visit our Divi child themes, plugins, tutorials, and courses here: www.peeayecrea...
Thanks for watching!
Thanks a lot for this, my client will be happy!
Thanks Nelson. I've been looking for how to do this for a long time. This tutorial is super simple! Like many of your other tips! thanks again
You're welcome! I am really glad you found it, thanks!
absolute, godsend.
I'm so glad you like it!
tHANK YOU !!
You're welcome!
Is there a way to make this appear for only a specific category of Portfolio?
Cool 🎉 and how to put it on Person Module, Sir?
That would be totally different, as a person module is not like a blog or portfolio which shows items dynamically from the posts.
@@PeeAyeCreative would you please make a video for it, sir🙏
Very helpful. One wishlist item would be to be able to use shortcodes in the excerpt. I've seen snippets that can enable shortcodes in excerpts but they don't work for me when using the Divi Portfolio module and your snippet. Hoping to add a small media player but no luck. :(
Sorry nothing we are doing. Maybe try the blog module instead?
@@PeeAyeCreative Yeah, it's just the ideal module as the plan was to have multiple musicians as portfolio items so they are easy to add and embed in multiple places on the site. Tried some third party modules and no luck. May look into Custom Post Types.
Great Tutorial! Would it be possible to do the same with showing tags instead of the excerpt?
We don't have the code for that, sorry.
Nice one Nelson! Thank you, everything is working, but the excerpt lenght.
Maybe ET changed something into the Divi core and it's not working anymore:
// Set Excerpts Words Limit
$excerpt_limit = 10;
where did you got the body text shows, it does not show in mine or show me where to white the body text :)
If you are referring to the except text, it is the excerpt from the individual project, so you would need to write your text there.
How can we equalize column heights when we have excerpts that have different amounts of words / length?
(...and also possibly pushing the buttons to the bottom of the div with:
.et_pb_portfolio_item {
display: flex;
flex-direction: column;
}
.et_pb_portfolio_link {
margin-bottom: 15px;
margin-top: auto;
}
I don't have any tutorial on that yet, but I'll note this idea for the future.
@@PeeAyeCreative Yep this would be perfect because after adding titles and excerpts the project posts are all different sizes.
Weird that with multiple rows every other row is wider than the one above it. Anybody else experiencing this?
I'm not sure what you mean.
Same thing happened to me. So where you had just 1 row of portfolio posts in your demo I had 4 rows (16 total)
The first row has one width (let's say it was 80% like a generic Divi row setting) and the second row ends up being slightly wider (85% for instance).
Then the third row would be regular size again (80%), and the fourth row would be slightly wider again (85% again).
This code breaks my whole page!?!?!?!?
No, it doesn't 😉 Please be sure to add PHP carefully as directed, otherwise yes making modifications can break things.
@@PeeAyeCreative It absolutely did. Any idea why? I followed instructions and made no modifications myself whatsoever. The code is in the functions.php of the child-theme. The rest of the site keeps functioning normally, but the page with the portfolio module breaks.
Sorry I didn't know, never heard of that. The code is perfect, so it must be some conflict with something else specifically on your site.