Hello Guys, come here to ask for help because you already slammed head and I could not do it, I'm a nerd curious and that I not spent.

I need a function that I can manually enter a value in the post and that value is displayed in another item of the site, the thumbnails.
where is the value: xxx views here: guiclo.com (field tests)

I've got a site that displays the post grid, thumbnails.
I want to write into the video posts, length: 5:19
and I want to appear on the thumbnail of this post it on the display grid of posts: 05:19.

My tests domain: guiclo.com - here you can see how the lengh field is empty in the post and so does not appear in thumbnail, and there is not how to complete it in the admin panel Wordress.

END <<<<<<<<<

Observations for those who want to tell me where to change, instead of making a new function.

the subject has a videofunctions.php function that automatically injects the value of other site he esa importing the videos, I do
this insertion manually.

<?php

/* Return number of videos found (for titles) */

function wp_script_theme_get_nb_video(){

global $wp_query;

$nb_videos = $wp_query->found_posts;

$output = '(';

if( $nb_videos > 1 ){

$output .= $nb_videos . ' ' . __( 'videos', 'wp_script_theme' );

}else{

$output .= $nb_videos . ' ' . __( 'video', 'wp_script_theme' );

}

$output .= ')';

if( $nb_videos ){

return $output;

}else{

return false;

}

}

/* Return video length */

function wp_script_theme_get_video_length( $type_length = '' ){

global $post;

$length_seconds = get_post_meta(get_the_ID(), 'complete', true);

if( (int)$length_seconds > 0 ){

if( (int)$length_seconds > 3600 ){

return date( 'H:i:s', $length_seconds );

}else{

return date( 'i:s', $length_seconds );

}

}else{

return false;

}

}

E and php item that displays the thumbanil (item2-thumbs.php) has a function that calls the value of time.

<? php if (wp_script_theme_get_video_length ()):?>

<span class = "length"> <? php echo wp_script_theme_get_video_length (); ?> </ span>

the value of time is automatically populated by a function of a plugin that makes auto mass import of videos from other sites, I want to be able to fill this value by hand, someone could help me?

That's it. Thank you all.

question_php.txt
    Write a Reply...