WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get lastpostdate

Description

Retrieve the date the the last post was published.

The server timezone is the default and is the difference between GMT and server time. The 'blog' value is the date when the last post was posted. The 'gmt' is when the last post was posted in GMT formatted date.

Usage

<?php get_lastpostdate$timezone ?>

Parameters

$timezone
(string) (optional) The location to get the time. Can be 'gmt', 'blog', or 'server'.
Default: 'server'

Return Values

(string) 
The date of the last post.

Examples

Notes

  • Uses: apply_filters() Calls 'get_lastpostdate' filter
  • Uses global: (mixed) $cache_lastpostdate Stores the date the last post.
  • Uses global: (object) $wpdb
  • Uses global: (integer) $blog_id The Blog ID.

Change Log

Since: 0.71

Source File

get_lastpostdate() is located in wp-includes/post.php.

Related

See also index of Function Reference and index of Template Tags.