How do I debug a short code?

Question

I am trying to debug a shortcode. I have written the following function and placed in my theme’s functions.php file:

function michael_function_shortcode() {
    return 'This is the return';
}

I have defined the shortcode as follows:

add_shortcode(‘michael’, ‘michael_function_shortcode’);

And I have included the shortcode on a page:

[michael]

I know the function is there because if I introduce errors I get messages because of debug=true, but [michael] just displays and is not replaced by ‘This is the return” as expected.

Where do I go from here? How do I debug this?

0
, mkstlwtz 5 years 2018-06-28T22:35:59-05:00 0 Answers 70 views 0

Leave an answer

Browse
Browse