stlastla Posted October 8, 2011 Share Posted October 8, 2011 Hi, I´m working with a code on a wordpress blog. the code goes as follows: <?php get_header(); ?> <div id="content"> <?php if(get_option('freshlife_featured_content_enable') == 'on') { ?> <div id="featured-content"> <div class="heading"> <span class="heading-text"><?php _e('Hovedoppslag', 'themejunkie'); ?></span> </div> <!-- end .heading --> <ul> <?php $counter = 1; query_posts( array( 'showposts' => get_option('freshlife_featured_post_num'), 'tag' => get_option('freshlife_featured_post_tags') ) ); if( have_posts() ) : while( have_posts() ) : the_post(); ?> <li class="featured-<?php echo $counter; ?>"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail('featured-thumb', array('class' => 'entry-thumb')); ?></a><span class="entry-date"><abbr title="<?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>"><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . __(' siden', 'themejunkie'); ?></abbr></span><h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li> <?php $counter++; endwhile; endif; wp_reset_query(); ?> </ul> </div> <!-- end #featured-content --> This is as you probably see a code for telling the time of when a wordpress post was published. I need to identify where the word "day" comes from within the code. If you take a look at www.digio.no and look at the featured posts which a located at the top under the name "hovedoppslag" You will see the text "1 day siden" in the upper left corner of the picture. I want to translate that word into an other language or remove it. Can somebody tell me how I do that? Quote Link to comment https://forums.phpfreaks.com/topic/248709-need-help-to-identify-a-word-in-this-code/ Share on other sites More sharing options...
Androider Posted October 11, 2011 Share Posted October 11, 2011 I did something like this some time ago, let me try to find it for you Quote Link to comment https://forums.phpfreaks.com/topic/248709-need-help-to-identify-a-word-in-this-code/#findComment-1278321 Share on other sites More sharing options...
ManiacDan Posted October 11, 2011 Share Posted October 11, 2011 echo human_time_diff(get_the_time('U'), current_time('timestamp')) That appears to print the human-readable time difference (hence the function name). Go into that function and translate its output properly. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/248709-need-help-to-identify-a-word-in-this-code/#findComment-1278331 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.