WordPress Telegram Bot - How To - Fire Shortcodes


How To Fire Shortcodes

Note: this option was first introduced in version 1.0.5.

The WordPress Telegram Bot plugin allows to execute shortcodes when some rule triggers. The option for executing shortcodes is available for the following rules:

These rules contain the option Fire shortcodes for adding shortcodes:

Field for adding shortcodes - Telegram Bot Plugin for WordPress
Field for adding shortcodes

The interface for Personal, Group and Channel messages is the same and the result is the same. So we will consider the example with the Group Messages rules.

As an example, we will use a shortcode of a third-party WordPress Interactive Map plugin - [cmloc-api]. This shortcode allows to enable or disable the API on the site, and as a result it prints the status of the API, if it's disabled or enabled.

So let's create two rules for group messages.

The first rule will fire on words "enable" and "api", and execute the shortcode for enabling API - [cmloc-api status="on"].

Example of firing the shortcode which enables the API status - WordPress Telegram Plugin
Example of firing the shortcode which enables the API status

The second rule will fire on words "disable" and "api", and execute the shortcode for disabling API - [cmloc-api status="off"].

Example of firing the shortcode which disables the API status - Telegram WordPress Widget
Example of firing the shortcode which disables the API status

As a result, we can enable or disable the API on the site directly from Telegram:

Result in action - Telegram Plugin for WordPress
Result in action

More information about the WordPress Telegram Bot plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.