Title: Test shortcode not working with multiple parameters
Last modified: April 2, 2025

---

# Test shortcode not working with multiple parameters

 *  Resolved [maroxis](https://wordpress.org/support/users/maroxis/)
 * (@maroxis)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/test-shortcode-not-working-with-multiple-parameters/)
 * Test shortcode functionality is not working with more than 1 parameter. It outputs
   either 0 or nothing. Copying shortcode and using it normally on site, shows correct
   value.

Viewing 1 replies (of 1 total)

 *  Plugin Support [Disu](https://wordpress.org/support/users/disu/)
 * (@disu)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/test-shortcode-not-working-with-multiple-parameters/#post-18406213)
 * Hi [@maroxis](https://wordpress.org/support/users/maroxis/) . Can you give a 
   more exhaustive example, telling us which shortcodes do you use?
 * However I created a simple test shortcode that write a text with a custom color
   and size, that are two shortcode parameters. When I test it with Shortcodes Finder
   it works correctly.
 * You can try adding this code to **functions.php**
 * `function colored_text_shortcode($atts, $content = null) {
    $atts = shortcode_atts(
   array( 'color' => 'black', 'size' => '16px'), $atts, 'colored_text' ); $content
   = do_shortcode($content); return '<span style="color: ' . esc_attr($atts['color']).';
   font-size: ' . esc_attr($atts['size']) . ';">$content . '</span>';}add_shortcode('
   colored_text', 'colored_text_shortcode');
 * If you try the **colored_text **shortcode in the plugin, using as parameters:**
   color=red size=32px**
   and as text: **Simple text**you will see a colored and 
   big text. So it is working with two parameters.
 * Consider that, depends on how some shortcodes are written, some of them cannot
   work in a test environment, like the page provided by the plugin.

Viewing 1 replies (of 1 total)

The topic ‘Test shortcode not working with multiple parameters’ is closed to new
replies.

 * ![](https://ps.w.org/shortcodes-finder/assets/icon-256x256.png?rev=2305831)
 * [Shortcodes Finder](https://wordpress.org/plugins/shortcodes-finder/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-finder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-finder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-finder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-finder/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [test](https://wordpress.org/support/topic-tag/test/)

 * 1 reply
 * 2 participants
 * Last reply from: [Disu](https://wordpress.org/support/users/disu/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/test-shortcode-not-working-with-multiple-parameters/#post-18406213)
 * Status: resolved