Support » Plugins and Hacks » upPrev » UpPrev and a Custom Field

  • Resolved popsantiago

    (@popsantiago)


    Hi,

    I want to change the description post of the UpPrev div, i find this way :
    Line 453 ==> i change get_the_excerpt() by
    $item .= sprintf( '<p>%s</p>', get_post_meta(get_the_ID(),'description_visit_factory',true) );

    But this field didn’t be excerpted…
    How can i use the “$excerpt_length” to excerpt my custom field ?

    I think the UpPrev file got a function, because when i use get_the_excerpt() mine is more than 5 words (for the test) and upPrev give me only 5 words like the config plugin… But i can’t find this function.

    Thank for the help.

    http://wordpress.org/extend/plugins/upprev/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marcin Pietrzak

    (@iworks)


    Excerpt length is setting in line: 363-365:

    if ( $excerpt_length > 0 ) {
        add_filter( 'excerpt_length', 'iworks_upprev_excerpt_length', 72, 1 );
    }

    And affect only (get_)the_excerpt() functions using build-in filters. I don’t limit words by my own function.

    You can’t use $excerpt_length inside upPrev plugin, but You can use this outside:

    get_option( 'iworks_upprev_excerpt_length' );

    popsantiago

    (@popsantiago)


    That’s done !
    Really thank !

    My that’s could be an extra feature for next release 😉
    Admin option Switch Content for CustomField > put the Key
    And Displaying in the UpPrev…

    I don’t know… But i did it for me.

    See your and thanks for fast reply

    Plugin Author Marcin Pietrzak

    (@iworks)


    My that’s could be an extra feature for next release 😉
    Admin option Switch Content for CustomField > put the Key
    And Displaying in the UpPrev…

    You can use iworks_upprev_box_item to totally change a content of each item.

    Something Like this example, but change static content to Your:

    http://upprev.com/is-there-a-way-i-can-use-non-post-content-in-this-plugin.html

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘UpPrev and a Custom Field’ is closed to new replies.