hello guys i hope you all well... i have php code and short code can anyone tell me how i can convert my shortcode into php code i use this but it cannot display create a error. <?php echo do_shortcode("[lms_feature_course count="5"]"); ?> i need this will done like this [lms_feature_course count="5"] = <?php php funtion ; ?>
Are you doing this inside a post/page editor or in PHP code? If you are doing it in PHP code, I cannot see why you need to use a shortcode at all when you can just do it in code. If you are using the shortcode in the post/page editor, you are best to use add_shortcode() to declare a function to be used to process your shortcode tag. And since you are passing in a value with the shortcode, be sure to study the examples using $atts. https://codex.wordpress.org/Function_Reference/add_shortcode Unless I misinterpreted your post.