I created a checkbox field. I created a shortcode to display that to the logged in user:
add_shortcode( 'show_causeofloss_as', 'createcauseoflossshortcode' );
function createcauseoflossshortcode() {
if(is_user_logged_in()){
$user_id = get_current_user_id();
$value_cause = get_user_meta( $user_id, 'user_cause', true);
return $value_cause;
}
}
BUT this just returns the word “Array”. I’ve tried lots of variations of this too and just get the word array. I’ve searched all over for weeks (the only thing I can’t figure out) and no one seems to have the same issue.
Any ideas?
Is there anyway to return the data from checkbox selection with a shortcode?