• Hi,

    Is there a way to change the lenght or the size of the box in the service section ? I would like all the boxes have the same size !

    The traditional code I use doesn’t work :

    <?php function new_excerpt_length($length) {
    return 15;
    }
    add_filter(‘excerpt_length’, ‘new_excerpt_length’);
    ?>

    Thank you !

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    Please try putting this function in your main functions.php :

    function onepress_custom_excerpt_length( $length ) {
    	return 15;
    }
    add_filter( 'excerpt_length', 'onepress_custom_excerpt_length', 999 );

    Let me know how it goes!

    Thread Starter Mayouchette

    (@mayouchette)

    Hi thank you for the reply,
    But I’m sorry to tell that it doesn’t work. The website doesn’t load anymore.
    I “copy paste’ the code at the end of functions.php – that’s right?

    Hi @mayouchette,

    Yes. You need to enter the code at the end of functions.php. Or you can try put this:

    remove_filter( 'excerpt_length', 'onepress_custom_excerpt_length' );
    function my_custom_excerpt_length( $length ) {
    	return 15;
    }
    add_filter( 'excerpt_length', 'my_custom_excerpt_length', 999 );

    Let me know how it goes!

    Thread Starter Mayouchette

    (@mayouchette)

    Hi,
    Sorry, But it’s the same answer
    the website does not load anymore,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Excertpt lenght in service section’ is closed to new replies.