Snippets

Crumina Team [Seosight] Change date on post from updated to created

Created by Alexandr Kostyrka
function seosight_posted_time( $icon = true){
		$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
		
		$time_string = sprintf( $time_string,
			esc_attr( get_the_date( 'c' ) ),
			esc_html( get_the_date() )
		);

		$icon_html = (true === $icon) ? '<i class="seoicon-clock"></i>' : '';

		return sprintf(
			'<span class="post__date">' . $icon_html . $time_string . '</span>'
		);
	}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.