Explanation of WordPress Code Reference

WordPress Code Reference

WordPress code reference is the documentation of all the code from the newest updates. You can click on links and it gives Description about what it does. It also gives a clickable link to the API's that are used to build WordPress web sites.

the_date() function

The function the_date will output the date of the current post , but only if it is different from the previous post. The function can be called multiple times, but if multiple posts are created on the same date, only 1 date will show up.

the_date Format Parameters

Parameters: all are optional

$before is a string
-Displays output before the date specified

$after is a string
-Displays output after the date specified

$display is a boolean
-Determines whether to echo date or return it

<?php the_date( 'Y-m-d', '<h2>', '</h2>' ); ?> * Displays the date using the ‘2007-07-23’ format (ex: 2004-11-30), inside an <h2> tag.

Summary of Documentation

The WordPress code reference is a great source to help developers research functions. It also has documentation about the API's used on the platform.