gdtt_get_datearchive_link

gdtt_get_datearchive_link($post_type, $year = 0, $month = 0, $day = 0)

  • $post_type: custom post type name.
  • $year: year for the archive link.
  • $month: month for the archive link.
  • $day: day for the archive link.

Get date based archive for post type. If you need month archive, year parameter must be used. If you need day archive, both month and year must be used.

Function returns: string|WP_Error HTML link to post type date archive.

Comments

Leave a Reply