admin_url( 'admin-ajax.php' ) ) );
wp_enqueue_script( 'genre-ajax-js' );
wp_enqueue_style( 'style-css', plugin_dir_url( __FILE__ ) . 'style.css' );
}
/* Public function get_genre_filters accepts two parameters
* $post_type : the post type slug to query
* $taxo : the taxonomy slug to query
* used for display the filters in your template (for example archive.php) like that :
* $new_posts_filter = new Ajax_Filter_Posts();
* echo $new_posts_filter->get_genre_filters('post', 'category');
*/
public function get_genre_filters($post_type, $taxo) {
$terms = get_terms($taxo);
$filters_html = false;
if( $terms ):
$filters_html .= '