Shortcode not working in widget
You have a conditional in your function that will skip (return) if the current “view” is not a single post. You also have an undefined variable $content – the following has the condition removed and undefined variable fixed (always, always have debugging on when building with WordPress): function newsletter_signup_shortcode( $atts ) { $post_type = get_post_type(); … Read more