php - How to change the way the date is displayed in WordPress -


i permanently remove the day , month date keep year. wordpress 4.8.1 running culture theme.

in other words; when i, in future, write , publish post, year shown on blogpage (frontpage) , on single post view.

any ideas on how fix that?

you can use below function , modify according requirement

function my_project_filter_publish_dates( $the_date, $d, $post ) { return date( 'y', strtotime( $the_date ) ); } add_filter( 'get_the_date', 'my_project_filter_publish_dates', 10, 3 ); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -