Make sticky post with FacetWP

Ok, I figured it out myself. So maybe I can help someone out with the same question.

I made a custom field TRUE / FALSE called “featured”.

In facet WP I created this query:

<?php
return array(
    'post_type' => 'custom_post_type',
    'post_status' => 'publish',
    'meta_query' => array(
        'is_featured' => array(
            'key' => 'featured',
            'compare' => 'EXISTS'
        )
    ),
    'orderby' => array(
        'is_featured' => 'DESC'
    )
);

In FacetWP I used a simple if statement for the featured div:

<?php if ( get_field( 'featured' ) ): ?>
<div class="default-class featured">
<?php else: ?>
<div class="default-class">
<?php endif; ?>

Maybe not the best way to do it but it worked for me.

error code: 523