Show data in shortocode obtained from a function
Question
//Hello, I need a variable $ custom_field obtained from a text through a form, pass it to my shortcode, how to do it? I have been with this for days and could not take this variable to my shortcode . This is returning the data along with the button and the form field
function josh_admin_menu(){ add_menu_page('Forms','Form Items','manage_options','josh-admin-menu','josh_admin_menu_main','dashicons-cart'); } add_action('admin_menu','josh_admin_menu');
function my_recent_post(){ return ; // if I put return josh_admin_menu_main(); returns the data along with the button and the text field } add_shortcode( 'my-shortcode', 'my_recent_post' );
0
shortcode
3 years
2020-07-06T18:10:50-05:00
2020-07-06T18:10:50-05:00 0 Answers
69 views
0
Leave an answer