Support » Theme: UnderStrap » Double Date On Entry Header

  • Hy.

    On my wordpress instalation with understrap-child.

    there is double time-stamp (date published and date modified) on entry-header.

    How to fix this?

    Double time Stamp

    Thanks for this great bootstrap themes. 🙂

Viewing 1 replies (of 1 total)
  • Theme Author Alex Booth

    (@holger1411)

    Hi!
    Shjowing the publishing date and the edit date is not a bug. Makes sense on content heavy pages (like blogs) to show when a article was published initially and when it was updated.

    If you want to remove the edit date open inc/template-tags.php and search for:

    <time class=”updated” datetime=”%3$s”>%4$s</time>

    Remove this.
    If you working with a child theme copy the whole function:
    function understrap_posted_on() {
    $time_string = ‘<time class=”entry-date published updated” datetime=”%1$s”>%2$s</time>’;
    if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
    $time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time><time class=”updated” datetime=”%3$s”>%4$s</time>’;
    }
    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( ‘c’ ) ),
    esc_html( get_the_modified_date() )
    );
    $posted_on = sprintf(
    esc_html_x( ‘Posted on %s’, ‘post date’, ‘understrap’ ),
    ‘ . $time_string . ‘
    );
    $byline = sprintf(
    esc_html_x( ‘by %s’, ‘post author’, ‘understrap’ ),
    ‘<span class=”author vcard”>‘ . esc_html( get_the_author() ) . ‘</span>’
    );
    echo ‘<span class=”posted-on”>’ . $posted_on . ‘</span><span class=”byline”> ‘ . $byline . ‘</span>’; // WPCS: XSS OK.
    }

    to your child themes functions.php and than do the changes there.

Viewing 1 replies (of 1 total)
  • The topic ‘Double Date On Entry Header’ is closed to new replies.