Can i put my shortcode inside a variable in php files? July 14, 2022 by Tarik Billa You need to call do_shortcode(), as in: $check_in = do_shortcode ('[st_custom_meta key="st_custom_available_dates"]') ;