WP-Drudge Returning Wrong Date Format on Single Post Page

Welcome! Support WP-Drudge Settings WP-Drudge Returning Wrong Date Format on Single Post Page

This topic contains 3 replies, has 2 voices, and was last updated by  Pedro 1 week, 4 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Pedro

    Help guys,

    I’m having trouble with this.

    My general setting for WordPress on date format is: Day/Month/Year.

    But suddenly the WP-Drudge started to invert the format to Month/Day/Year in the single post page. And this is making so many people confuse about the date posts.

    On the main/landing page i’m getting the right value: Day/Month/Year, but in single page post not.

    You can see in http://www.politz.com.br and open any post.

    I don’t know what i have to do to make this right.

    And last question: Any news on a new release of WP-Drudge?

    Pedro

    If it helps, this is my code from single.php (never changed):

    <?php get_header(); ?>
    
    <div id="content-wrap">
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    	<?php
    	$curr_link = get_drudge_metas( false, false );
    	$sidebar_id = wpd_get_key( 'wpd_display_rightcol' ) === 'yes' ?
    		'sidebar-' . wpd_get_key( 'wpd_display_columns' ):
    		'sidebar-post';
    	?>
    
    	<?php do_action( 'wpd_hook_single_post_top' ); ?>
    
    	<?php if (is_active_sidebar( $sidebar_id )) : ?>
    
    	<div class="page-header">
    		<h1 class="the-title"><?php the_title(); ?></h1>
    	</div>
    	<div id="single-col">
    
    	<?php else: ?>
    
    	<div id="single-wide">
    		<h1 class="the-title"><?php the_title(); ?></h1>
    
    	<?php endif; ?>
    
    			<div id="post-<?php the_ID() ?>" <?php post_class(); ?>>
    
    				<?php
    				if ( ! empty( $curr_link['link_out'] ) ) {
    
    					$link_insert = wpd_is_link_external( $curr_link['link_out'] ) ?
    						wpd_headline_link_insert( get_the_ID(), FALSE ) : '';
    					
    					echo sprintf(
    						'<p class="external-link"><a href="%s"%s>%s</a>
    						<a href="%s"%s><img src="%s" width="%d" height="%d"></a></p>',
    						esc_url( $curr_link['link_out'] ),
    						$link_insert,
    						sanitize_text_field( wpd_get_outbound_link_text( $curr_link['link_out'] ) ),
    						esc_url( $curr_link['link_out'] ),
    						$link_insert,
    						get_template_directory_uri() . '/images/link.gif',
    						13,
    						13
    					);
    				}
    				?>
    
    				<?php
    				if ( wpd_get_key( 'wpd_display_postinfo' ) ) {
    					$output = wpd_get_key( 'wpd_display_postinfo' );
    					if ( $output === 'yes' ) {
    						$output = 'Posted [datetime] by [author] [comments]';
    					}
    					$output = str_replace( '[date]', date_i18n(
    							get_option( 'date_format' ),
    							strtotime( get_the_date() )
    						), $output );
    					$output = str_replace( '[datetime]', date_i18n(
    	                         get_option( 'date_format' ),
    	                         strtotime( get_the_date() )
    						) . ' ' . get_the_time(), $output );
    					$output = str_replace( '[author]', sprintf(
    						'<a href="%s" rel="author">%s</a>',
    						get_author_posts_url( get_the_author_meta( 'ID' ) ),
    						get_the_author_meta( 'display_name' )
    					), $output );
    					$output = str_replace( PHP_EOL, '<br>', $output );
    					$output = str_replace( '[tags]', get_the_tag_list( '', ', ', '' ), $output );
    					$output = str_replace( '[categories]', get_the_category_list( '', ', ', '' ), $output );
    
    					$comments_number = get_comments_number( get_the_ID() );
    					if ( comments_open() || ! empty( $comments_number ) ) {
    						$output = str_replace( '[comments]', sprintf(
    							'<a href="#the-comments">%s%s</a>',
    							wpd_get_key( 'wpd_link_text_comments' ),
    							! empty ( $comments_number ) ? ' (' . $comments_number . ')' : ''
    						), $output );
    					} else {
    						$output = str_replace( '[comments]', '', $output );
    					}
    					echo '<p class="the-meta">' . strip_tags( $output, '<a><br><strong><b><em><i><p><hr>' ) . '</p>';
    				}
    				?>
    
    				<div class="the-content cf">
    
    					<?php echo $curr_link['image_html'] ?>
    
    					<div class="additional-links">
    						<?php echo wpautop( $curr_link['add_link_html'] ) ?>
    					</div>
    
    					<?php echo $curr_link['blurb_text'] ?>
    
    					<?php
    					wp_link_pages( array(
    						'before' => '<div class="wp_link_page_nav">',
    						'after'  => '</div>',
    						'echo'   => 1
    					) );
    					?>
    
    					<?php do_action( 'wpd_hook_single_post_bottom' ); ?>
    
    				</div>
    
    				<div id="the-comments">
    					<?php comments_template(); ?>
    				</div>
    
    			</div>
    
    			<p class="home-link"><?php echo wpdrudge_home_link() ?></p>
    
    		</div>
    
    		<?php if ( is_active_sidebar( $sidebar_id ) ) : ?>
    			<div id="sidebar-col" class="single-sidebar">
    				<?php dynamic_sidebar( $sidebar_id ) ?>
    			</div>
    			<div class="clear"></div>
    		<?php endif; ?>
    
    		<?php endwhile; endif; ?>
    
    	</div>
    
    	<?php get_footer(); ?>
    
    
    PROPER SUPPORT

    Hi Pedro,

    Above code is absolutely fine and worked on my end.

    Please procide us your admin credentials so that we can check the issue.

    Pedro

    Anybody here?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.