Home › Forums › Calendar Products › Events Calendar PRO › help with excerpt after update
- This topic has 3 replies, 2 voices, and was last updated 10 years, 4 months ago by
Josh.
-
AuthorPosts
-
December 3, 2015 at 11:25 am #1034916
Corrado
Participanthi there, I just updated to version 4, I used in my own template on my website, the following code help to manage the excerpt length, as I wish display excerpt (my own function.php file in my wn theme)
`function custom_excerpt_length( $length ) {
if ( tribe_is_photo() ) {
return 30;
}
return 50;
}
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 ); `Now is not working anymore and just see the full text …. help
http://www.corradoprever.com/webtest001/How should I modify accordingly to your last release?
December 4, 2015 at 8:32 am #1035565Josh
ParticipantHey Corrado,
Thanks for reaching out to us!
The latest version no longer uses the default excerpt but also includes a bug where full content is used and the content isn’t limited for any of the main calendar/archive views.
We’ve got this bug logged in our internal tracking system and will notify you here as we make progress on this issue. I apologize for any inconvenience that this issue has caused.
In the meantime, you can fix this issue by making some quick modifications to the core plugin. These changes will get overridden with the next update which will include an official fix to this issue.
Within the main Events Calendar plugin, navigate to the src > functions > template-tags > general.php file and open it within your preferred text editor.
Navigate to line #1320 within that file. It should look like:
$excerpt = wp_trim_excerpt( $excerpt );You can change that line to be:
$excerpt = wp_trim_words( $excerpt, ’55’ );Where “55” is the number of words that you would like the excerpt to be there.
Let me know if you have any further questions or concerns here.
Thanks!
December 11, 2015 at 2:30 pm #1039891Corrado
ParticipantThank you… my project at the moment is in stand by so I’m not in a hurry, I restored the previous release and will wait next release and I hope that excerpt will be shown instead of the full text, I think is quite a common requirement.
December 15, 2015 at 7:36 am #1041685Josh
ParticipantHey Corrado,
No problem. I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new thread.
Thanks!
-
AuthorPosts
- The topic ‘help with excerpt after update’ is closed to new replies.
