Home › Forums › Calendar Products › Events Calendar PRO › Limiting words in the_excerpt()
- This topic has 4 replies, 2 voices, and was last updated 8 years, 10 months ago by Brian.
-
AuthorPosts
-
May 20, 2015 at 7:37 am #963861OrlandoParticipant
Hi I have tried the various ways be creating a new function etc, but no joy, all i want to do is reduce the amount of text shown in the main loop of the list view.
Any help would be much appreciated..
Also would like my previous question https://theeventscalendar.com/support/forums/topic/how-to-change-widget-list-view-to-show-events-by-days-of-the-current-week/ replied to as well please, don’t see why paid customers have to wait so long.
Thanks.
May 20, 2015 at 1:37 pm #963996BrianKeymasterHi,
Thanks for using our plugins. I can help you out here.
There is no filter to modify the_excerpt() length.
However, there is a way to do it by editing the template.
To modify the list view template please follow our themer’s guide:
https://theeventscalendar.com/knowledgebase/themers-guide/
Then move and edit this file in your theme:
wp-content\plugins\the-events-calendar\views\list\single-event.php
On that file you want to edit this:
<?php the_excerpt() ?>
to something like to change modify the length:
<?php
$excerpt = get_the_excerpt();
$excerpt = substr( $excerpt , 0, 100);
echo $excerpt;
?>You can change the amount to something you like by changing the 100.
Let me know how that works out.
Thanks
Please note per our terms of service we may take up to 24 hours to respond to each posting you make although we try to get it sooner then that.
May 20, 2015 at 3:44 pm #964050OrlandoParticipantThanks for the help, I will give this a try,
apologies, I am impatient person by nature, especially when I have paid for something 🙂
Thanks again!
May 21, 2015 at 7:54 am #964165BrianKeymasterNo Worries.
Let me know how this works out.
Thanks
June 29, 2015 at 6:00 pm #973740BrianKeymasterSince I haven’t heard back from you here, I’m going to go ahead and close out this thread. Feel free to start a new thread if you have further issues. Thanks! 🙂
-
AuthorPosts
- The topic ‘Limiting words in the_excerpt()’ is closed to new replies.