Sometimes it can be useful to present visitors to your site with a list of all your Venues and Organizers.
Just like individual Events, Venues and Organizers are stored as posts in the database; this makes it really easy to query for them and build up a list.
To help your Venues and Organizers get some attention around your site, we created this handy extension for you.
Once you install and activate the plugin, you will have access to three new shortcodes:
- [tec_list_linked_posts post_type="..."]
Simply embed these – including some optional parameters – in a page or post and you’re done!
- The maximum number of Venues or Organizers to return
- Default: -1
- Post order: "ASC" or “DESC"
- Default: ASC
- Posts ordered by, passed to WP_Query
- Default: post_title
- Comma-separated list of Venue or Organizer post IDs
- Venue or Organizer author ID or "current_user"
- "yes" to include Venue or Organizer thumbnails
- "yes" to include Venue or Organizer details
- "yes" to include count of upcoming events for each Venue or Organizer
- "yes" to exclude Venues or Organizers without upcoming events
- Each Venue and Organizer will link to its own listing page only if you are running The Events Calendar PRO in addition to The Events Calendar. If you are not running PRO, it will output the titles without linking the items.
- If using this shortcode to output custom linked post types (such as Instructors), you will need to add some custom code to get the “count” and the “hide_empty” shortcode arguments to work.
The shortcode below is an example of a page showing a list of Venues.
Each title is automatically linked to the relevant Venue Page or Organizer Page (if you have PRO activated), and they’re listed alphabetically by default.
[list_venues thumb="yes" count="yes" details="yes" author="current_user" hide_empty="yes"]
- PHP version 5.4 or newer
- WordPress version 4.5 or newer
- The Events Calendar version 4.3 or newer
- March 23, 2018
- Feature – Registers a new [tec_list_linked_posts] shortcode that can have any linked post type passed to its “post_type” argument, which means this shortcode now supports custom linked post types (see code comments for limitations), such as from https://theeventscalendar.com/knowledgebase/linked-post-types/
- Tweak – Reworked some filters to fix some not being applied and to pass the $post_id to filters within the loop (for each linked post type post)
- March 19, 2018
- Fully rewritten in our Extensions Framework
- Fix – Listing Organizers now works
- Fix – No longer links to single Venue or Organizer pages if PRO is not active
- Feature – Optionally limit the quantity of Venues or Organizers output
- Feature – Optionally list Venue or Organizer by ID(s)
- Feature – Optionally exclude Venues or Organizers by ID(s)
- Feature – Optionally output Venue or Organizer featured image
- Feature – Optionally output Venue or Organizer count of upcoming events
- Feature – Optionally hide Venues or Organizers without upcoming events
- Feature – Optionally sort Venues or Organizers by WP_Query’s order and orderby parameters
- Feature – Optionally display Venues or Organizers by author
- April 1, 2015
- Initial version released as a Knowledgebase plugin.