Support

Home Forums Event Espresso Premium Excerpt Length – Filter Still Work?

Excerpt Length – Filter Still Work?

Posted: October 23, 2018 at 10:23 pm

Viewing 2 reply threads


Peak Creative

October 23, 2018 at 10:23 pm

I have tried employing the recommended filter from a post in 2016:

EE Excerpt Filter

The fact that it’s two years old and that it’s not working has me wondering if this is still the recommended approach? Essentially:

espresso_event_content_or_excerpt( SOMELENGTH, null, false );

Adding those arguments breaks the function in my tests. Thanks.


Tony

  • Support Staff

October 24, 2018 at 5:31 am

Hi there,

That function hasn’t changed and can still be used in the same way, what happens when you add those arguments? Do you get any errors or just nothing returned?


Josh

  • Support Staff

October 24, 2018 at 5:44 am

Hi,

The filter still does work. Here’s a link to the source that shows the hook:

https://github.com/eventespresso/event-espresso-core/blob/master/public/Espresso_Arabica_2014/content-espresso_events-details.php#L28

If you use the espresso_event_content_or_excerpt() function in your callback function, please be aware that the output may not be what you expect because the output can be affected by options set in Event Espresso > Events > Templates. For your reference:
the espresso_event_content_or_excerpt() helper method
https://github.com/eventespresso/event-espresso-core/blob/master/core/helpers/EEH_Event_View.helper.php#L143

If you can post a link to a pastbin or a GitHub gist that includes your code in context we can help you troubleshoot further.

Viewing 2 reply threads

The support post ‘Excerpt Length – Filter Still Work?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso