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:

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"].

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

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

![]() |
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 |