How to execute a shortcode within a custom field?
Using the_field(); will just return the content of that field (guessing it’s just text field?). <?php if (is_user_logged_in()) { $userid = get_current_user_id(); get_userdata($userid); $shortcode = get_field(‘view_files_shortcode’, ‘user_’ . $userid); } ?> <?php echo do_shortcode($shortcode); ?>