Hi.
Thank you for using my plugin.
I’m looking for a js solution to solve your issue, so it can be plugin independent.
Otherwise, you may build a child function, but it’s not so easy.
Here is the js solution:
Step 1:
Open the Acme Portfolio Module and add a new class to it called ‘short_excerpt’

Step 2:
Add a ‘Code’ module after the Acme Portfolio module
Step 3:
Add this code to your ‘Code’ Module:
<script>
jQuery(document).ready(function($) {
var myExLength=20; //replace this value with custom
var myStrTermination='...'; //replace this string with custom value
$('.short_excerpt').find('p').each(function(){
if(!$(this).hasClass('post-meta')){
var curTxt=$(this).text();
var newTxt=curTxt.substr(0,myExLength)+myStrTermination;
$(this).text(newTxt);
}
});
});
</script>
The problem with javascript is that it is rendered after the page has loaded, so you may see the original long text disappear after some seconds.
In order to avoid this issue you may code inside the php module.
If you need further support, just drop me a message.
Take care
mirko
Thread Starter
pandx
(@pandx)
Thank you for this! I will give it a try.
You may change the values for
myExLength (now is 20 letters) and
myStrTermination (now is set to ‘…’)
Let me know if this solves your issue.
m