Custom shortcodes not working using __s theme

Make sure to use straight quotes, e.g. ' or " and not curly quotes , , , or for strings.

Also, shortcodes should return their output, not echo it.

When WordPress finds a shortcode without a callback, it displays the shortcode tag just as it was entered e.g. [case_study_second_image_sc].

The shortcode tag ‘case_study_second_image_sc’ and the associated callback ‘get_second_image’ will be parsed as constants by PHP. This means we won’t have a valid shortcode tag or callback function for our shortcode and WP will just output the shortcode as it was entered by the user.

Turning on error reporting helps to find these tricky errors (sometimes curly quotes appear in copy/pasted code and it can be difficult to differentiate quotes in some editors).

Use of undefined constant ‘case_study_second_image_sc’ - assumed '‘case_study_second_image_sc’'

Use of undefined constant ‘get_second_image’ - assumed '‘get_second_image’'