M
M
Minusator2018-04-19 17:33:27
PHP
Minusator, 2018-04-19 17:33:27

How to wrap in span tags in Wordpress function?

Hello!
Wordpress has a function that displays the date of the post in the format - 02/12/2018 at 13:00

function theme_post_date( $date ) {    
    $date = get_the_time( 'd.m.Y \в\ G:i' );        
    return $date;
}

How to make the entire structure appear in span tags?
Thanks for the solution.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Kornilov, 2018-04-19
@KorniloFF

echo '<span>' . theme_post_date(some) . '</span>';

M
Maxim Timofeev, 2018-04-19
@webinar

return '<span>' . $date . '</span>';
So it doesn't work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question