Title: shortcode not working
Last modified: March 28, 2023

---

# shortcode not working

 *  Resolved [markohoza](https://wordpress.org/support/users/markohoza/)
 * (@markohoza)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-working-444/)
 * Hi.
 * After the last update in 5.7.5.1, the “shortcode_atts_wpcf7” filter stopped working.
   Do you know where the problem is?
 * Form:
 *     ```wp-block-code
       [hidden offer default:shortcode_attr]
       ```
   
 * functions.php:
 *     ```wp-block-code
       // Contactform7: shortcodes
       add_filter('shortcode_atts_wpcf7', 'maus_shortcode_atts_wpcf7_filter', 10, 3);
       function maus_shortcode_atts_wpcf7_filter( $out, $pairs, $atts ) {
           if( isset($atts['offer']) ) $out['offer'] = $atts['offer'];
           return $out;
       }
       ```
   
 * single.php:
 *     ```wp-block-code
       [contact-form-7 title="Dopytový formulár: ponuka" html_id="form-demand" offer="XYZ"]
       ```
   
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-working-444/#post-16602796)
 * Since CF7 5.7.5 and 5.7.5.1, it seems like you are required to specify the form
   ID in your shortcode. Previously it worked fine with only the title.
 * So, update your shortcode like this (change 123 to your form ID):
 *     ```wp-block-code
       [contact-form-7 id="123" title="Dopytový formulár: ponuka" html_id="form-demand" offer="XYZ"]
       ```
   
 *  Thread Starter [markohoza](https://wordpress.org/support/users/markohoza/)
 * (@markohoza)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-working-444/#post-16603010)
 * Thanks!
   Adding the form id to the shortcode helped.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘shortcode not working’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [markohoza](https://wordpress.org/support/users/markohoza/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/shortcode-not-working-444/#post-16603010)
 * Status: resolved