I'm working on my first shortcode, examples in Shortcode API are not suitable for starters, so I'm almost sure I'm doing it wrong!
My shortcode:
function hello( $atts ) {
extract( shortcode_atts( array(
'foo' => 'something',
'bar' => 'something else',
), $atts ) );
return 'Hello, World!';
return $foo;
}
add_shortcode('hw', 'hello');
And I want [hw foo=HEHEHE] to output: Hello, World! HEHEHE.
But it displays only Hello, World!
How to access & echo shortcode attributes and eventually how to set the default value (I guess I've already set the default values to "something" and "something else" but I'm not sure since I have no idea how to output them.
