Title: Error in the shortcodes (attributes).
Last modified: August 20, 2016

---

# Error in the shortcodes (attributes).

 *  [Alexander Balya](https://wordpress.org/support/users/balya/)
 * (@balya)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/error-in-the-shortcodes-attributes/)
 * Ceased to be handled gracefully shortcodes in WP. For example, if you use [bartag
   foo = “foo-value”], then the function is activated, but the parameter “foo” is
   not transmitted. Because of this, there are errors in the function.
    I tried 
   to disable all plug-ins, but to no avail.
 * **On the example it looks like this.**
 * The code in functions.php:
 *     ```
       function bartag_func( $atts ) {
       	extract( shortcode_atts( array(
       		'foo' => 'something',
       		'bar' => 'something else',
       	), $atts ) );
       	return "foo = {$foo}";
       }
       add_shortcode( 'bartag', 'bartag_func' );
       ```
   
 * Shortcode to the editor:
    `[bartag foo="foo-value"]`
 * Results per page:
    `foo = something`
 * Although, according to the normal, the result should be a:
    `foo = foo-value`
 * Please help deal with the problem.

The topic ‘Error in the shortcodes (attributes).’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Alexander Balya](https://wordpress.org/support/users/balya/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/error-in-the-shortcodes-attributes/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
