Creating Custom Dynamic Tags

Documentation Menu

Creating Custom Dynamic Tags

Dynamic tags can be used in email and settings fields to send dynamic data to the customer. You can see a list of all the available tags in the Form Dynamic Tags page.

If you need to create your own, you can do so by adding some custom code in your theme’s functions.php file.

Syntax

add_filter('wpbs_dynamic_tag', 'your_function', 10, 3);

The function accepts 3 parameters and returns a string.

Examples

1. Create a dynamic tag that shows the number of nights.

2. Return the booking start date in a Ymd format.

3. Return the booking ID as an integer

Was this article helpful?

Yes (1) No

We're sorry to see this article wasn't as helpful as we hoped it would be. Please let us know what you were looking for so that we can improve this documentation page.

Full CTA BG
Is WP Booking System a good fit for you?

Tell us about your business activity & plugin requirements and we'll let you know if WP Booking System is right for you.

Have a support question? Please use this form instead.