For some reasons every shortcode, that I try to add to functions.php, displays only default attribute value and ignores what I specify in a post. E.g.:
function my_shortcode( $atts ) {
extract( shortcode_atts(
array(
'id' => '18',
), $atts )
);
return $id;
}
add_shortcode( 'sc', 'my_shortcode' );
So I use shortcode [sc id="81"] and expect echoing 81 but I get 18. BTW I use child theme, and latest version of wordpress. I'm really stuck. Thanks for any help.
extracthere as it may result in broken-ness and it can overwrite globals making this a security issue too