Where to render booking calendar

Where to render Booxter booking calendar in your theme's template file

By default the booking calendar will be rendered right below the post content. It hooks onto WordPress’ the_content hook so whatever is passed thru it, the calendar itself will show up underneath.

On the other hand, you can easily tell Booxter where to show up in case default behaviour is not quite adequate. Find out whether your current theme or a plugin provide custom content hooks and make the booking calendar render elsewhere – as easy as that!

As a fallback case, you can always create your own hook, it’s nothing but a single line of code in a target template. For instance…

Let’s say you have a full-width.php custom template in your theme’s folder and you decided to use that very template as a booking subject.
There are no custom content hooks for that template neither you want to use default rendering position. Obviously, you’ll have to create your own, custom hook to render the booking calendar at.

Open full-width.php template file for edit and add the following code to desired line:

<?php do_action( "MY_THEME_ACTION_NAME" ); ?>

Replace “MY_THEME_ACTION_NAME” with the real name of your hook. It can be anything you like but use alphanumeric characters only and be sure that there’s no space between words. Use underscore instead.

By adding this chunk of code you created the placeholder for your Booxter calendar.

Save the template file, get back to Booxter settings then let it know the name of your content hook. On front-end, the placeholder will be replaced with your booking calendar.

In case you decided to use Booxter Property plugin, the following will be the name of the custom content hook: