WordPress is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes. WordPress was originally created as a blog-publishing system but has evolved to support other web content types including more traditional mailing lists and forums, media galleries, membership sites, learning management systems (LMS), and online stores.
Why WordPress?
In short, WordPress offers a large amount of freedom for website owners. It is the most used CMS with a market share of 41%.
In Administrate, a lot of our clients use WordPress websites to feature their business and expose their training catalogs. Their main aim is to publicize their products and share them on social media platforms to generate more traffic for their business and ultimately maximize their profits and expand their sales.
In order to facilitate, standardize and streamline the integration of Administrate’s features into our client’s WordPress-driven platforms we built a collection of WordPress plugins and a PHP SDK.
With the help of those plugins, our clients can easily pull their catalog from our Training Management System and integrate Weblink into their own website, creating their own publicly accessible catalog that matches their brand. This will help them convert their business WordPress website into an e-commerce web application powered by Administrate’s platforms.
Why did we built the plugins?
With the increase of interest in integrating Weblink into our client’s WordPress websites, we came up with a solution that streamlines this process.
The plugins removed a lot of manual work required from the client’s development, and content editorial teams. Instead of custom development, the client’s team will use the plugin to populate the courses and learning path widgets along with keeping everything in sync with our Training Management System (TMS).
Challenges
We had to overcome some challenges along the way; synchronizing TMS content into WordPress, serving weblink widgets in a non blocking manner for speed optimization and making sure course images are optimized for web consumption.
Solutions
To resolve those challenges, we first started utilizing our platform’s webhooks! With the webhooks we were able to maintain real-time updates from the TMS to be reflected into WordPress without the need to rely on cron jobs pulling Content periodically into WordPress.
As for image optimizations, we are relying on WordPress default image presets as well as any other presets available in the active theme. With that, we are allowing WordPress to serve the image in the best size to quality ratio suited for web consumption. Also, our clients can optimize their images more by using 3rd party libraries or plugins (Imagify, tinypng) to resize and serve next-generation images (WebP), as well as introduce Caching or CDNs to better serve web assets for faster delivery.
The Plugins
Our main scope of work for the plugins was:
- Automate adding Administrate services, and Weblink embeddable components/widgets
- Having a standard way of connecting to the Administrate APIs
- Ease of integration and usage to provide the best user experience
We also took into consideration the fact that clients will want to create their custom catalog page along with custom course templates, and the ability to expose the XML sitemaps to be parsed by search engines for better SEO.
Like any product, the plugins still have a lot of room for growth, and improvement. We are planning to tackle a lot of those enhancements and add more functionalities in the near future.
Major Capabilities of the plugins
- Converting WordPress into an e-commerce web application for the TMS Courses.
- Synchronizing all your courses and learning paths information into WordPress as Course posts in one click; backfill.
- Using the webhooks to keep courses and learning paths synchronized into WordPress from the TMS (title, description, price, etc.).
- Ability to select what custom fields to synchronize (using custom filters).
- Cross-linking of courses with WordPress content pages such as featuring related courses on WordPress content pages and blog articles.
- Creating a custom course catalog page with search capabilities using a simple WordPress shortcode! (The search is driven by our Weblink’s API).
[admwpp-search-form pager='full' filters='category,date,location' per_page=12]
- Ability to expose custom hooks (filters/actions) to enable overriding params and values as per client’s request.
- Ability to override plugin templates in the active WordPress theme to apply branding and custom styles by the clients (some development work might be needed).
- Use short-codes and/or Gutenburg block to generate weblink widgets (Cart page, Basket, Event Lists, etc.)
- Generating and adding a gift voucher widget to enable customers to add/buy gift vouchers.
- SEO friendly.
- Courses are available on the XML site map.
Shortcode examples
Adding shortcodes in WordPress is very simple! After adding the plugin and configuring it, all you need to do on your page to show the EventList
is the following:
[administrate-widget type="EventList" course_code="CODE"]
If you want something more specific, here is a more detailed example of removing some of the event list filters:
[administrate-widget type="EventList" course_code="CODE" date_filter="false" location_filter="false" course_filter="false" category_filter="false"]
If there is a need to change the dropdown filter wording for Learning Path
to Bundle
. To accomplish that, we will have to understand what we have already defined in our plugin:
global $ADMWPP_SEARCH_COURSES_TYPES;
$ADMWPP_SEARCH_COURSES_TYPES = array(
'CourseTemplate' => __('Course', 'admwpp'),
'LearningPath' => __('Learning Path', 'admwpp'),
);
$typesFilter = apply_filters('admwpp_course_types_filter', $ADMWPP_SEARCH_COURSES_TYPES);
So what we will need to do, is overwrite the types updating the type for LearningPath
to Bundle
:
function catalogueTypesFilterOptions($types)
{
$types['LearningPath'] = __('Bundle', 'custom_text_domain');
return $types;
}
add_filter('admwpp_course_types_filter', 'catalogueTypesFilterOptions', 10, 1);
Output will become:
We are planning on documenting all of the shortcodes functionalities in the near future to encourage developers to be self-sufficient when using our plugin.
Any other CMS for the future?
Currently, there are no plans to add support for other CMSs (Drupal, Joomla, etc.) in the pipeline. But you never know what the future holds.
References
https://en.wikipedia.org/wiki/WordPress
https://trends.builtwith.com/cms/traffic/Entire-Internet
https://wordpress.org/plugins/imagify/
https://packagist.org/packages/administrate/phpsdk
https://github.com/Administrate/administrate-wp-plugin
https://github.com/Administrate/administrate-wp-weblink-plugin