Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #502953

    I previously had these filters in my child functions.php file and they were working perfectly:

    add_filter(‘avf_magazine_excerpt_length’,’avf_magazine_excerpt_new_lenght’, 10, 1);
    function avf_magazine_excerpt_new_lenght($excerpt) {
    $excerpt = 330;
    return $excerpt;
    }

    add_filter(‘avf_postgrid_excerpt_length’,’avia_change_excerpt_length’,10,1);
    function avia_change_excerpt_length()
    {
    return 175;
    }

    After updating to the latest version of Enfold the filters do nothing in my parent or child theme functions.php folders. Can you tell me what I am doing wrong? I have tried making changes both in my Editor dashboard and in CPanel.

    I would greatly appreciate any of your guidance!

    #503350

    Hey trinawelzlpc!

    I have added codes to functions.php file of your child theme and they are working fine. Please review your website now.
    Edit: I also added a private “test” post, category and page

    Cheers!
    Yigit

    • This reply was modified 8 years, 6 months ago by Yigit.
    #503680

    Hi Yigit,
    Thank you for taking a look! I have reviewed the website and my magazine filters are still not working. The posts on the homepage should display not just the post image and title but also an excerpt (330 characters). Thanks for your help!
    Daniel

    #503967
    #518892

    Thank you, Yigit. This works but only if I select “Should the first entry be displayed bigger” checkbox. I do not want the first entry to be bigger but when I disable this the excerpts go away. Is there a way to get the excerpts without that first entry being bigger?
    Thanks again!

    #518980

    I also noticed that when the excerpts are displayed it changes my thumbnails so that some of them are cropped into the top part of the thumbnail frame. Any ideas on how to avoid this? Thanks!

    #519679

    Hi!

    Please undo the modification then look for this code:

    if(empty($this->atts['thumbnails']))
    				{
    					 $image = "";
    					 $extraClass = "av-magazine-no-thumb";
    				}

    Below, add this:

    $excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 10) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, '');	
    

    Cheers!
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.