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.
location
Sydney
and Australia
both work for us.dateformat
number
number="20"
.offline
cache_temp
cache_temp
before trying again. In the meantime, the above message will be displayed.cache
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.
Considerations
- 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.
https://api.wordpress.org/events/1.0
https://api.wordpress.org/events/1.0/?number=3
https://api.wordpress.org/events/1.0/?location=Seattle
https://api.wordpress.org/events/1.0/?location=Australia
https://api.wordpress.org/events/1.0/?latitude=51.051&longitude=13.738
https://api.wordpress.org/events/1.0/?ip=136.0.16.1
https://api.wordpress.org/events/1.0/?country=IT
- Since this article was written, WordPress has released V4.8 of the platform. The dashboard now includes local meets by default.
- 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.
Download
Title: Display WordPress Meetups (WP Plugin)
Description: Display WordPress Meetups With a Shortcode or PHP Function. Renders WordPress meetups in a specific area. Results are cached for 24 hours.
Download • Version 0.1, 1.9K, zip, Category: WordPress Plugins (General)
WordPress Shortcodes, (1.1K) PHP Code & Snippets, (1.1K)