• hello.

    I want to show the Published date | Modified date in the meta of my blog at the same time.

    I found a snippet that changes the Published date to Modified date, but I would like to know if there is a way to display them at the same time.

    Thanks.

Viewing 1 replies (of 1 total)
  • Hi @seotaro,

    Please try and/or modify the following

    function your_prefix_post_date( $output ) {
    	$format        = apply_filters( 'astra_post_date_format', '' );
    	$modified_date = esc_html( get_the_modified_date( $format ) );
    	$modified_on   = sprintf(
    		esc_html( '%s' ),
    		$modified_date
    	);
    	$separator = ' /';
    	$published_string = 'Published : ';
    	$updated_string = $separator . ' Last updated : ';
    	$updated_output = ' ' . $modified_on;
    	$modified_output = $published_string . $output . $updated_string . $updated_output;
    	return $modified_output;
    }
    add_filter( 'astra_post_date', 'your_prefix_post_date' );

    Kind regards,
    Herman ??

Viewing 1 replies (of 1 total)
  • The topic ‘Is there a way to show the Published date and Modified date at the same time?’ is closed to new replies.