Shortcode with custom content attribute?
The second parameter of your shortcode function is the content. So rewrite the function: function shortcode_call_to_action( $attributes = NULL, $content=”” ) { $stylesheetdir = get_bloginfo(‘stylesheet_directory’); if ( ” === $content ) { // use a default text if there is no content $content=”default text”; } return “<div id=’call_to_action’> <img src=”https://wordpress.stackexchange.com/questions/58438/$stylesheetdir/images/call_to_action.jpg” alt=”” /> <p>$content</p>”; } If … Read more