Shortcodes

 > Posts > FAQ > Frontend > Shortcodes

CHRONOSLY SHORTCODES

WordPress shortcodes are defined as a simple set of functions for creating macro codes to be used in post content.

It enables plugin developers to create special kinds of content (e.g. forms, content generators) that users can attach to certain pages by adding the corresponding shortcode into the page text.

Chronosly shortcode works using this code:

[chronosly param1="value1" param2="value2"]

 

Check shortcode most common mistakes  chronosly-warning-logo-lq

as many params as you want from this list.

'type' => 'calendar', //type: allowed calendar, event, organizer, place, category
'upcoming' => 0, //upcoming: set days period for upcoming events.
 "year" => date("Y"), //year: for filtering event list or show calendar year, format Y
 "month" => 0, //month: for filtering event list or show calendar month, format m
 "week" => 0, //week: for filtering event list or show calendar week, format W
 "day" => 0, //day: for filtering event, format Y-m-d
 'id' => 0, //id: for individual reference of elements, coma separated. if type is category the id is the category name not tag_id.
 'author' => 0, //filtered by author id
 'exclude' => 0, //id of excluded elements, coma separated
 'single' => 0,  //set if we want to show the single or archive view, not allowed on calendar view.
 'count' => 10, //number of results
 'navigation' => 0, //set to show navigation on top
 'pagination' => 0, //set to show pagination on bottom
 'category' => 0, //filter by specific categories,coma separated 
 'organizer' => 0, //filter by specific organizers, coma separated
 'place' => 0, //filter by specific places, coma separated.
 'small' => 0, //set 1 if your width is smaller than 450px like sidebar.
 'template' => 'default', //set template name.
 'featured' => yes/no //set to show only featured events or just normal.

 

Shortcodes details and examples for each available section can be found below:

 

 

 

 

EVENTS

There are 2 different views to show Chronosly events:

  1. Event list view (can include featured and normal events)
  2. Single event view (landing page for an event)

1. Event list view you cant use this shortcode

[chronosly type="event"]

Chronosly - Event list view (1 Featured and 3 normal events)

 

This Event List Shortcode can use the following PARAMETERS. Note: if any parameter is included within the shortocode, event list will be shown following Chronosly settings configurations.

'upcoming' => 0, //upcoming: set days period for upcoming evediv.
"year" => date("Y"), //year: for filtering event list or show calendar year, format Y
"month" => 0, //month: for filtering event list or show calendar month, format m
"week" => 0, //week: for filtering event list or show calendar week, format W
"day" => 0, //day: for filtering event, format Y-m-d
'id' => 0, //id: for individual reference of elements, coma separated. if type is category the id is the category name not tag_id.
'exclude' => 0, //id of excluded elements, coma separated
'count' => 10, //number of results
'navigation' => 0, //set to show navigation header
'category' => 0, //filter by specific categories,coma separated
'organizer' => 0, //filter by specific organizers, coma separated
'place' => 0, //filter by specific places, coma separated
'small' => 0, //set 1 if your width is smaller than 400px like sidebar
'featured' => yes/no //set to show only featured events or just normal

Here are some examples for the most used event list shortcodes parameters:

Note: The following parameter examples can be combined with each other. Is important to combine them with sense

- Show an UPCOMING DAYS EVENT LIST start from today. 10 upcoming days event list (upcoming days can be any positive number)

[chronosly type="event" upcoming="10"]

 

- Show event list from A PARTICULAR MONTH. Event list for August (just set month number)

[chronosly type="event" month="8"]

 

- Show event list from A PARTICULAR DAY. Event list for November 21th 2014 (just set day number as your settings format)

[chronosly type="event" day="2014-11-21"]

 

There are other parameters for day, week, month and year that allows you to show upcoming or past events.

 

- Show event list from TODAY, THIS WEEK, MONTH OR YEAR. (Default event order is descending: from earliest to latest) Event list for today

[chronosly type="event" day="current"]

 

Event list for this week

[chronosly type="event" week="current"]

 

- Show event list from YESTERDAY, LAST WEEK, MONTH OR YEAR. (Default event order is descending: from earliest to latest) Event list for yesterday

[chronosly type="event" day="past"]

 

Event list for last month

[chronosly type="event" month="past"]

 

Event list for all past events

[chronosly type="event" upcoming="past"]

 

- Show event list FILTERED BY CATEGORIES.

  • use category tag_id to set categories
  • separate different categories by commas

(Default event order is descending: from earliest to latest)

Event list for categories 1, 4 and 7.

[chronosly type="event" category="1,4,7"]

 

- Show event list FILTERED BY ORGANIZERS.

  • use organizer tag_id to set organizers
  • separate different organizers by commas

(Default event order is descending: from earliest to latest) Event list for organizers 1 and 3

[chronosly type="event" organizer="1,3"]

 

- Show event list FILTERED BY PLACES.

  • use place tag_id to set places
  • separate different places by commas

(Default event order is descending: from earliest to latest) Event list for places 2 and 3

[chronosly type="event" place="2,3"]

 

SHOW SPECIFIC EVENTS.

  • use event tag_id to set events
  • separate different events by commas

 

Event list for events 3, 7 and 24

[chronosly type="event" id="3,7,24"]

 

- EXCLUDE SPECIFIC EVENTS.

  • use event tag_id to set events
  • separate different events by commas

Event list for ALL events except events 3, 7 and 24

[chronosly type="event" exclude="3,7,24"]

 

PARAMETERS THAT ONLY AFFECT PAGE AND EVENT STYLE

- SHOW CALENDAR AND TITLE NAVIGATION

Title calendar navigation links

 

  • navigation parameter is always "1"

Event list with top navigation linked to Title and Calendar

[chronosly type="event" navigation="1"]

 

 

SHOW PAGINATION

Chronosly shortcode pagination

 

  • pagination parameter is always "1"

 

Event list with pagination (previous - next event list page)

[chronosly type="event" pagination="1"]

 

 

SHOW EVENTS FOR NARROW PAGES (WIDTH UNDER 400px)

  • small parameter is always "1"

 

Event list adapted to narrow pages

[chronosly type="event" small="1"]

 

 

SHOW ONLY FEATURED/NORMAL EVENTS

  • featured parameter is "yes" only display Featured events
  • featured parameter is "no" only display Normal events

 

Event list with only Featured events

[chronosly type="event" featured="yes"]

 

Event list with only Normal events

[chronosly type="event" featured="no"]

 

 

 

2. SINGLE EVENT PAGESHOW SINGLE EVENT PAGE FOR A SPECIFIC EVENT

Single event view fully detailed
Single event view fully detailed

 

  • single parameter is always "1"
  • only insert one event tag_id per shortcode

 

Single event page for event 24

[chronosly type="event" single="1" id="24"]

Go to Shortcodes menu

 


ORGANIZERS

There are 2 different views to show Chronosly organizers:

  1. Organizer list view (can include featured and normal organizers)
  2. Single organizer view (landing page for an organizer)

 

1. Organizer list view you cant use this shortcode

[chronosly type="organizer"]

 

Chronosly - Organizer view - All Ogranizers list view
All Ogranizers list view

 

 

- SHOW SPECIFIC ORGANIZERS.

  • use organizer tag_id to set organizers
  • separate different organizers by commas

 

Organizer list for Organizers 1, 3 and 4

[chronosly type="organizer" id="1,3,4"]

 

EXCLUDE SPECIFIC ORGANIZERS.

  • use organizer tag_id to set organizers
  • separate different organizers by commas

 

Organizer list excluding Organizers 1, 3 and 4

[chronosly type="organizer" exclude="1,3,4"]

 

2. SINGLE ORGANIZER PAGE

SHOW SINGLE ORGANIZER PAGE FOR A SPECIFIC ORGANIZER

Chronosly - Single organizer view
Single organizer view fully detailed

 

 

  • single parameter is always "1"
  • only insert one organizer tag_id per shortcode

Single organizer page for Organizer 3

[chronosly type="organizer" single="1" id="3"]

 

PARAMETERS THAT ONLY AFFECT PAGE AND ORGANIZER STYLE

SHOW CALENDAR AND TITLE NAVIGATION

  • navigation parameter is always "1"

 

Organizer list with top navigation linked to Title and Calendar

[chronosly type="organizer" navigation="1"]

 

SHOW ORGANIZERS FOR NARROW PAGES (WIDTH UNDER 400px)

  • small parameter is always "1"

 

Organizers list adapted to narrow pages

[chronosly type="organizer" small="1"]

 

Go to Shortcodes menu

 

 

 

PLACES

There are 2 different views to show Chronosly places:

  1. Places list view (can include featured and normal places)
  2. Single place view (landing page for an place)

 

 

1. Place list view you cant use this shortcode

[chronosly type="place"]

 

Chronosly - Place view - All Places list view
All Places view list

 

SHOW SPECIFIC PLACES.

  • use place tag_id to set places
  • separate different places by commas

 

Places list for Places 1, 3 and 4

[chronosly type="place" id="1,3,4"]

 

EXCLUDE SPECIFIC PLACES.

  • use place tag_id id to set places
  • separate different places by commas

 

Places list excluding Places 1, 3 and 4

[chronosly type="place" exclude="1,3,4"]

 

 

2. SINGLE PLACE PAGE

SHOW SINGLE PLACE PAGE FOR A SPECIFIC PLACE

Chronosly - Single Place view
Chronosly - Single Place view fully detailed

 

  • single parameter is always "1"
  • only insert one place tag_id per shortcode

 

Single place page for Place 3

[chronosly type="place" single="1" id="3"]

PARAMETERS THAT ONLY AFFECT PAGE AND PLACE STYLE

SHOW CALENDAR AND TITLE NAVIGATION

  • navigation parameter is always "1"

 

Place list with top navigation linked to Title and Calendar

[chronosly type="place" navigation="1"]

 

SHOW PLACES FOR NARROW PAGES (WIDTH UNDER 400px)

  • small parameter is always "1"

 

Places list adapted to narrow pages

[chronosly type="place" small="1"]

 

Go to Shortcodes menu

 

 

 

 

 

CATEGORIES

 

There are 2 different views to show Chronosly catrgories:

  1. Category list view (all categories and 3 events per category)
  2. Single category view  (all events from one category)

 

1.Category list view you cant use this shortcode

[chronosly type="category"]

 

Chronosly - Category view - All categories list view

 

 

- SHOW SPECIFIC CATEGORY.

  • use  category_id to set category
  • separate different categories by commas

 

Category list for Categories 1, 3 and 4

[chronosly type="category" category="1,3,4"]

 

 

2. SINGLE CATEGORY PAGE

SHOW SINGLE CATEGORY PAGE FOR A SPECIFIC CATEGORY

Chronosly single category shortcode

  • single parameter is always "1"
  • only insert one category per shortcode

Single category page for Category 3

[chronosly type="category" single="1" id="3"]

 

PARAMETERS THAT ONLY AFFECT PAGE AND CATEGORY STYLE

SHOW CALENDAR AND TITLE NAVIGATION

  • navigation parameter is always "1"

 

Category list with top navigation linked to Title and Calendar

[chronosly type="category" navigation="1"]

 

SHOW CATEGORIES FOR NARROW PAGES (WIDTH UNDER 400px)

  • small parameter is always "1"

 

Organizers list adapted to narrow pages

[chronosly type="category" small="1"]

 

Go to Shortcodes menu

 

 

 

 

CALENDARS

There are 3 different views to show Chronosly calendars:

  1. Calendar Year view
  2. Calendar Month view
  3. Calendar Week view

Remember, if year, month, week is specified the calendar stays fixed for the specification.

 

If you want to show always the current year,month, week , use current on the parameter value.

 

1 - CALENDAR YEAR VIEW 

Calendar year view

 

  • year parameter uses year set in number or current for current year

 

Calendar year view for 2014

[chronosly type="calendar" year="2014"]

 

Calendar year view for current year

[chronosly type="calendar" year="current"]

 

2- CALENDAR MONTH VIEW 

Chronosly Grid template month view event density

 

  • month parameter uses month number or current for current month

 

Calendar month view for August

[chronosly type="calendar" month="8"]

 

Calendar month view for current month

[chronosly type="calendar" month="current"]

 

3- CALENDAR WEEK VIEW

Chronosly Grid template week view event density

 

  • week parameter uses week number or current for current week

 

Calendar week view for week 39

[chronosly type="calendar" week="39"]

 

Calendar week view for current week

[chronosly type="calendar" week="current"]

 

Using the above shortcodes examples, with "year", "month" and "week", you can combine  with other parameters used in sections for Events, Organizers and Places For example, you can filter by some specific events, organizers or places

 

SHOW CALENDAR FILTERED BY DIFFERENT PARAMETERS

 

Calendar year view for 2014 and only shows events 1, 6 and 194

[chronosly type="calendar" year="2014" event="1,6,194"]

 

 

Calendar year view for 2014 and only shows events for organizers 1 and 3

[chronosly type="calendar" year="2014" organizer="1,3"]

 

 

Calendar month view for August and only shows events for places 1 and 3

[chronosly type="calendar" month="8" place="1,3"]

 

 

Calendar week view for 55th week and exclude events 1 and 3

[chronosly type="calendar" week="55" exclude="1,3"]

 

Go to Shortcodes menu

 

 

 

TEMPLATES

From Chronosly update 2.0 template shortcode was launched.

Use this basic Template shortcode to set different templates in different pages.

 

For events:

[chronosly type="event" template="your_template_name"]

 

Remember, set your_template_name as is shown in Chronosly. You can easily find your template names going to Templates status section:

Chronosly > Templates status

 

Template status - Chronosly settings

 

NOTE: The following parameter examples can be combined with each other, for example for organizers, places, calendar etc... Is important to combine them with sense

For organizers:

[chronosly type="organizer" template="your_template_name"]

 

For Default template:

[chronosly type="event" template="default"]

 

Grid template:

[chronosly type="event" template="grid"]

 

or if you have cloned a template and saved as my_cloned_template:

[chronosly type="event" template="my_cloned_template"]

 

 

Go to Shortcodes menu