Skip to content

Shortcode

Kees Meijer edited this page Jun 14, 2017 · 3 revisions

Use the shortcode [pt_calendar] to display a calendar in your posts.

The shortcode has these attributes you can use:

post_type

A comma separated list of post types to include in the calendar. Default post.

[pt_calendar post_type="page,movie"]

date

Display calendar with posts from this date. Date consisting of year and month separated with a dash (YYYY-MM). Default now (current date).

[pt_calendar date="2014-07"]

post_ids

A comma separated list of post ids to include in the calendar. Make sure the posts are within the same year and month. Default none.

[pt_calendar post_ids="12,43,66"]

start_of_week

Day to start the calendar on, 0-6 where 0 is Sunday. Default 0.

[pt_calendar start_of_week="1"]

linkto

Link post titles to posts or date archives. Accepts: post, date_archive or empty string. Default: post

[pt_calendar linkto="date_archive"]

day_names

Type of weekday names in the calendar header. Accepts: 'abbreviation', 'weekday' or 'initial'. Default abbreviation.

[pt_calendar day_names="weekday"]
Clone this wiki locally