Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.24/5 (3 votes)
See more:
Hi, I am creating a custom plugin and want to create a shortcode in this file.
I am using this code
function wpb_resultData_shortcode() {
     $message="hello";
     echo $message;

}

add_shortcode('show_Data', 'wpb_resultData_shortcode');

And using the [show_Data] in my page I am not getting the data

What I have tried:

function wpb_resultData_shortcode() {
     $message="hello";
     echo $message;

}

add_shortcode('show_Data', 'wpb_resultData_shortcode');
Posted
Updated 6-Dec-22 5:45am

1 solution

I have no idea what a "shortcode" is, but I did Google it and found this[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900