Get the slug of the active page / post / archive term

<?php

/**
 * You can use this within your FacetWP template if needed
 * such as along with WP_Query's `postname` argument
 * or within a `term_query` argument
 */
$uri = FWP()->helper->get_uri();
$parts = explode( '/', trim( $uri, '/' ) );
$slug = array_key_last( $parts );