WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problem with the_time (4 posts)

  1. aesquis
    Member
    Posted 1 year ago #

    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?

  2. Media X
    Member
    Posted 1 year ago #

    Try this:
    <?php the_date('d/m/Y'); ?>

  3. aesquis
    Member
    Posted 1 year ago #

    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.

  4. aesquis
    Member
    Posted 1 year ago #

    I mark this topic as resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic