perform register_shortcodes() {
add_shortcode( ‘traits’, ‘shortcode_sj_charcs’ );
}
add_action( ‘init’, ‘register_shortcodes’ );
perform shortcode_sj_charcs( $atts ) {
ob_start();
world $wp_query,
$put up;
$atts = shortcode_atts( array(
'catgy' => ''
), $atts, 'traits' );
$loop = new WP_Query( array(
'posts_per_page' => 200,
'post_type' => 'traits',
'orderby' => 'menu_order title',
'order' => 'ASC',
'tax_query' => array( array(
'taxonomy' => 'characteristics_category',
'area' => 'slug',
'phrases' => array( sanitize_title( $atts['catgy'] ) )
) )
) );
if( ! $loop->have_posts() ) {
return false;
}
?>
have_posts() ) {
$loop->the_post();
?>
” class=”text-white”>