# WPBS search customization

This plugin changes behaviour of wpbs search.

- disables the search result popup
- adds classes to post cards based on their's avaliablity

Added classes

- no special class - no dates were selected, or the search failed
- `booking-avaliable` - these are the avaliable posts
- `booking-not-avaliable` - these are allready booked posts

## How to implement

Enable plugin in `config.json`

```json
{
  //...
  "wpbs_order_details": true
}
```

In the archive page output the post id's to the post card custom `wpbs-post-id` attribute. Additional classes will be added to this element.

```php
echo '<div class="post-card" wpbs-post-id="' . get_the_ID() . '">';
```

If you have WPBS search on different pages, you can redirect to archive page:

```php
do_shortcode('[wpbs-search calendars="all" language="sk" title="no" redirect="archive"]');
```

last step is to implement some css to hide / disable / reorder your post cards based on these added classes.
