Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #386864

    Hello,

    First of all, thank you for this amazing WordPress template :)

    I have inserted 4 post sliders on my front page, and i want the excerpt to be longer. Right now it looks like this: http://d.pr/i/1dYqv and i have chosen this setting on all post sliders: http://d.pr/i/1ibEs

    I want the excerpt to be like 3 sentences,
    how do i do this?

    I’m looking forward to your answer :)

    Kind regards,
    Jonas

    • This topic was modified 9 years, 9 months ago by donbaek.
    #386938

    Hey donbaek!

    Thank you for using our theme.

    In functions.php put something like the following code:

    
    	add_filter( 'excerpt_length', 'new_excerpt_length' );
    	function new_excerpt_length( $more ) 
    	{
    		if(is_front_page())
    		{
    			return 150;
    		}
    		else 
    		{
    			return 50;
    		}
    	}
    

    Also see the following post:

    http://wordpress.stackexchange.com/questions/6310/how-to-control-manual-excerpt-length

    Cheers!
    Günter

    #387036

    Thank you Günter!

    It doesn’t seem to work. I have inserted the snippet you’ve sent here: http://d.pr/i/15swS (Bottom of the functions.php file.

    Can you check the URL I’ve already sent you?

    Thank you in advance :)

    #387253

    Hi!

    Thank you for coming back.

    Try to replace the code above with the following:

    
    	add_filter( 'excerpt_length', 'new_excerpt_length' );
    	function new_excerpt_length( $more ) 
    	{
    		if(is_home())
    		{
    			return 550;
    		}
    		else 
    		{
    			return 50;
    		}
    	}
    

    If it does not work, can you give us an admin access to your site pls?

    Cheers!
    Günter

    #392935
    This reply has been marked as private.
    #392977

    Hey!

    I have changed the code slightly, please go to Functions.php file and find following code

    add_filter( 'avf_postgrid_excerpt_length', 'new_excerpt_length' );
    	function new_excerpt_length( $more ) 
    	{
    		return 200;
    	}

    and adjust as needed

    Regards,
    Yigit

    #393617

    Hello Yigit,

    Is it possible that you can do this for me?
    I tried but i turned out as a php white screen failure..

    Thanks in advance

    #393633

    Hey!

    Thank you for coming backl.

    Yigit code is working. I adjusted the value to 600.

    Come back, if we shall alter the value for you.

    Best regards,
    Günter

    • This reply was modified 9 years, 9 months ago by Günter.
    #393660

    Thank you Günter!

    Really great support….

    #393667

    Hi!

    Glad we could help you. Enjoy the theme.

    Best regards,
    Günter

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How do i make the excerpt longer?’ is closed to new replies.