Có thể bạn quan tâm
Mặc định thì khi ta thêm shortcode ngoài những cái có sẵn của Contact Form 7 thì sẽ không chạy được. Vì vậy muốn chạy được shortcode trên form của Contact Form 7 ta thêm đoạn code sau vào file functions.php trong theme bạn đang dùng nhé:
add_filter( 'wpcf7_form_elements', 'mycustom_wpcf7_form_elements' ); function mycustom_wpcf7_form_elements( $form ) { $form = do_shortcode( $form ); return $form; }
Cảm ơn tác giả Takayuki Miyoshi: Tham khảo thêm tại https://wordpress.org/support/topic/plugin-contact-form-7-include-custom-shortcodes-in-form#post-2646163
Chúc các bạn thành công!
- Bình luận