WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Problem with the_time

[Resolved] Problem with the_time

  • Hello

    We have a problem with the_time, when we use <?php the_time('d/m/Y');?> or other format the page returns simply d/m/Y not the date

    This is an exmple of our code

    /*** FORMA 2 - 01/08/2012 ***/?>
    
    <div class="entry">
    
     <span style="font-weight:bold;"><?php the_time('d/m/Y');?></span>
    
    	  <h2><?php the_title();?></h2>
     	 <?php //the_advanced_excerpt('length=10');
       ob_start();
       the_advanced_excerpt('length=8');
       $postOutput = preg_replace('/<img[^>]+./','', ob_get_contents());
       ob_end_clean();
       echo $postOutput;
    
     ?>

    The result is:

    d/m/Y
    PÁSATE AL FOAM Y AHORRA EN EL COSTE DEL LAVADO Y CUIDADO DE MANOS
    Proquimia amplía su gama de higiene personal VITA, …
    + INFO

    Can some one help us?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try this:
    <?php the_date('d/m/Y'); ?>

    Thanks for your answer,

    The problem i think is with qtranslate plugin, finally I use

    <div class="entry">
    
     <span style="font-weight:bold;"><?php the_time('%d/%m/%y');?></span>

    And it works for me

    Any way I tryed your suggestion and doesn’t works for me.

    Thanks for you support.

    I mark this topic as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Problem with the_time’ is closed to new replies.
Skip to toolbar