Home Blog Display WordPress Meetups With Shortcode or a PHP Function

Display WordPress Meetups With Shortcode or a PHP Function


There’s a group of committed WordPress enthusiasts, bloggers, and developers that get together in most cities around the world for regular meetups. They group talks about their WordPress projects, list to guest speakers, and build upon features for the WP core. While I’ve never attended a local meet (partly because we have so many of our own), I’m keen to attend one in the future. To ensure I keep abreast of future dates, we built a little shortcode (utilizing the WP API ) that will render upcoming meets into a WordPress post or page.

We’ve listed Australian and local Sydney meets on a reference page. The shortcode on this website will permit you to do the same.

The Result

The next 5 meets in Sydney can be rendered with the shortcode of [wpmeets number="5" location="Sydney"]. The result:

WordPress Shortcode

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin. You may optionally download and install our plugin from the bottom of of the page.

If you require shortcode to work in a sidebar widget, you'll have to enable the functionality with a filter. If you're using our custom functions plugin, you'll have that feature enabled by default.

Shortcode Attributes

The following shortcode attributes are available.


You must specify a location. To determine if the location is supported by WordPress’ system, simply query the API in your browser with your location of choice. The location of Sydney and Australia both work for us.


If our date formatting isn’t to your liking, alter it in the shortcode function or as an attribute. Alter by way of PHP’s date() formatting.


If not defined, the API will return 10 results. Alter with number="20".


If the WordPress API is offline, we’ll display this message.


If the WordPress API is offline, we’ll wait cache_temp before trying again. In the meantime, the above message will be displayed.


The cache period is the time to cache results. We cache for 24 hours by default.

PHP Function

Used outside of WordPress, the following function may be used. Usage requires Simple Cache. Other than the location, arguments are passed to the function in an array.


  • WordPress lists API examples as listed below. Because you can search by geographical coordinates, you might consider applying our IP to location API and rendering results for specific locales, or resolving to the region or country level.


  • Since this article was written, WordPress has released V4.8 of the platform. The dashboard now includes local meets by default.

Display WordPress Meetups With Shortcode or a PHP Function

Meetups displayed in the WP Dashboard.

  • It’s likely we’ve missed various meetup types (camps, etc- not that it really matters). When they’re shown we’ll update the shortcode.


Title: Display WordPress Meetups With a Shortcode or PHP Function
Description: Display WordPress Meetups With a Shortcode or PHP Function. Renders WordPress meetups in a specific area. Results are cached for 24 hours.
Download: Shortcode (V0.1) | WP Plugin (V0.1) | PHP Code (V0.1)

■ ■ ■

Interested in WordPress and Web Design? Subscribe to our list and we'll send you subscriber-only tools and plugins

Short URL for this post: http://shor.tt/Jnd


Please enter your comment!
Please enter your name here