Skip to content

keesiemeijer/custom-post-type-date-archives

Repository files navigation

Custom Post Type Date Archives Build Status

Version: 2.7.1
Requires at least: 4.5
Tested up to: 5.5

Add date archives to WordPress custom post types

Plugin Description

Add Date archives to custom post types right in the dashboard itself. This plugin also provides widgets and editor blocks to display archives, calendars and recent posts. This allows you to use this plugin as a super simple events calendar.

Features:

  • Adds a date archives submenu for each custom post type
  • Adds the rewrite rules needed for viewing the date archives
  • Adds widgets and editor blocks for archives, calendars and recent posts
  • Allows you to publish scheduled posts with future dates like normal posts
  • Allows you to use specific theme templates files for cpt date archives
  • Adds WP Rest API endpoints for archives, calendar and recent posts

WordPress doesn't support date archives for custom post types out of the box. This plugin adds the rewrite rules needed to view the date archives at a pretty permalink.

Example permalink (url) for a custom post type events date archive.

https://example.com/events/2015/06/12

The calendar, archive and recent posts widget are similar to the existing WordPress widgets, but with extra (post type) options added.

The cpt date archives use the same theme template files as the normal WordPress date archives. Extra template files and template functions are available for use in the custom post type date archives.

Notice Custom post types must be registered to have archives and be publicly queryable for this plugin to add the date archives.

Settings Page

Documentation

For more information about this plugin see the Wiki

Developers

This is the development repository for the Custom Post Type Date Archives plugin.

Branches

The master branch is where you'll find the most recent, stable release. The develop branch is the current working branch for development. Both branches are required to pass all unit tests. Any pull requests are first merged with the develop branch before being merged into the master branch.

Pull Requests

When starting work on a new feature, branch off from the develop branch.

# clone the repository
git clone https://github.com/keesiemeijer/custom-post-type-date-archives.git

# cd into the custom-post-type-date-archives directory
cd custom-post-type-date-archives

# switch to the develop branch
git checkout develop

# create new branch newfeature and switch to it
git checkout -b newfeature develop

Creating a new build

To compile the plugin without all the development files use the following commands:

# Go to the master branch
git checkout master

# Install Grunt tasks
npm install

# Build the production plugin
grunt build

The plugin will be compiled in the build directory.

Bugs

If you find an issue, let us know here!

About

A WordPress plugin to add date archives to custom post types.

Resources

License

Stars

Watchers

Forks

Packages

No packages published