Event's Page Posts Text Lenght

Home Forums Calendar Products Events Calendar PRO Event's Page Posts Text Lenght

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1084481
    Kevin
    Participant

    Hello there,

    I wanted t reduce the abstract text of my events on my events page.

    I tried adding my function.php:

    function custom_excerpt_length( $length ) {
    return 20;
    }
    add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

    But it does nothing.

    My event ‘s page is on Photo View.

    I also tried adding the above function to my photo.php file but did not work either.

    Any suggestions would be much appreciated.

    Thank you.

    Best,

    Nima

    #1084875
    Hunter
    Moderator

    Hey Nima,

    Welcome to the forums!

    I added the following code in my functions.php file and it worked for me in photo view on the default WP Twenty Sixteen theme:

    function custom_excerpt_length( $length ) {
    return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    Try copying and pasting the exact code I used and see if it works for you. Have a good one and thanks for choosing PRO 🙂

    #1084896
    Kevin
    Participant

    Hey Hunter,

    As mentioned in my post, the code does not work on my theme (avada 3.9)

    If you need access to my control panel – please let me know,

    Any other suggestion are welcome.

    Thank you,

    Nima

    #1084902
    Hunter
    Moderator

    Hey Nima,

    I compared the code you provided against the code I replied with and they are in fact different, so please try and let me know if it works for you.

    You can enable the ability to input custom excerpts by selecting “Screen Options” in the top-right hand side when adding/editing an event. (see screenshot below)

    Additionally, I was able to get it to work on the default WP theme; so if it’s not working on your Avada theme, you may want to try contacting them about the excerpt length. Theme customizations/support extend beyond the scope we are able to provide through the support forums.

    Also, we are unable to log into client sites, so please refrain from sending over credentials. Thanks again and best of luck with the excerpt length!

    #1084913
    Kevin
    Participant

    Hey Hunter,

    Thanks for the prompt erply.

    The code still does not work.

    On the other hand, the custom excerpt option worked.

    Thanks!

    Nima

    #1085280
    Hunter
    Moderator

    Hey Nima,

    Thanks for the update and I’m glad you’ve found a solution. I’ll close this thread out but please open a new one if you have any more questions. Have a good weekend 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Event's Page Posts Text Lenght’ is closed to new replies.