badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

excerpt_length filter no run good

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #54119
    Pierre
    Participant

    This i the code in the ./inc/functions/functions.php 58

    Original code:

    add_filter('excerpt_length', 'wp_portfolio_excerpt_length');
    /**
     * Sets the post excerpt length to 50 words.
     *
     * function tied to the excerpt_length filter hook.
     *
     * @uses filter excerpt_length
     */
    function wp_portfolio_excerpt_length($length) {
    	return 50;// this will return 50 words in the excerpt
    }
    add_filter('excerpt_more', 'wp_portfolio_continue_reading');
    /**
     * Returns a "Continue Reading" link for excerpts
     */
    function wp_portfolio_continue_reading() {
    	return '<span class="leggiTutto">...Leggi tutto</span>';
    }

    The full test in my post is:

    Mi colpì la prospettiva, col grandangolo che avevo ho potuto dare un effetto profondità all’immagine, tra l’altro il trattore era acceso e vibrava tutto, ma con un tempo di scatto veloce ho bloccato l’immagine. (Bs).

    But inter thumb show only “Mi colpì la prospettiva, col grandangolo che avevo ho potuto dare un effetto profondità all’immagine, tra l’altr“. These are less than 50 words

    #54133

    Hi Pierre,

    the default value for excerpt is 50, However we have set the character length too for content that display on post content. You have to change the character length as well from ./inc/structure/content-extentions.php on line:40

    Thank you!

    #54137
    Pierre
    Participant

    There is an problem:

    In the ./inc/structure/content-extentions.php

    add_action( 'wp_portfolio_loop_content', 'wp_portfolio_theloop', 20 );

    In the ./inc/functions/functions.php

    function wp_portfolio_excerpt_length($length) {
          return 10;// this will return 50 words in the excerpt

    Show double image

    http://i68.tinypic.com/124hkz7.png

    This is the text: I 2 si contendevano “l’amichetta” nel cortile di casa. (Buffalora, Bs)

    #54143

    Hi Pierre,

    Please go to ./inc/structure/content-extentions.php on line no. 140 there you will see the below line of code.

    <p><?php echo substr(get_the_excerpt(),0,126); ?></p>
    Change the above character count value 126 as per your need.

    Thank you!

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