Line break description wordpress

You should use the filter to show the description. Try to replace $your_description with the custom field value. $content = apply_filters(‘the_content’, $your_description); echo !empty($your_description) ? $content : __(‘Nothing to show!’, ‘your_textdomain’);

Get all user meta_keys and then group users by matching values

Eventually came to a solution in case anyone needs it: function mb_get_user_meta_values( $mb_user_meta_key ) { if( empty($mb_user_meta_key) ) return; $mb_get_users = get_users( array( ‘meta_key’ => $mb_user_meta_key ) ); $mb_user_meta_values = array(); foreach( $mb_get_users as $mb_user ) { $mb_user_meta_values[] = get_user_meta( $mb_user->ID, $mb_user_meta_key, true ); } $mb_user_meta_values = array_unique( $mb_user_meta_values ); return $mb_user_meta_values; } Then I … Read more

Query post by Category and custom file (ACF)

You make a few mistakes in your code. To query posts by category you can use category_name [ref] or tax_query [ref] in query parameters. // category_name / cat / category__and ‘category_name’ => ‘event’, ‘tax_query’ => [ [ ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => ‘event’, ] ], ACF checkbox are stored in custom field, … Read more