Adding parameters to shortcode
-
I have shortcode like this:
[shortcode_name][/shortcode_name]
I would like to add parameters. Maybe something like this? How do I add them to shortcode?
[shortcode_name parameter=”parameter”][/shortcode_name]
If this is possible, also how do I add to code snippets. This is a working example without parameter.
add_shortcode( ‘shortcode_name’, function () {
$out = loop_through_data (“data”, $ADD_PARAMETER_HERE, $ANOTHER_PARAMETER_HERE);
return $out;
} );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding parameters to shortcode’ is closed to new replies.