| 开发者 |
Ibericode
DvanKooten hchouhan lapzor |
|---|---|
| 更新时间 | 2026年5月11日 14:33 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-3.0-or-later |
| 版权网址: | 版权信息 |
mailchimp-top-bar.zip to your plugins directory, which usually is /wp-content/plugins/.Yes, you can easily disable the notification bar on certain pages using a filter. For example, if you only want to load the Top Bar on your blog post pages, you can add this to your theme:
add_filter( 'mctb_show_bar', function( $show ) { return is_single(); } );
Another example, this only loads the email capture bar on your "contact" page:
add_filter( 'mctb_show_bar', function( $show ) { return is_page('contact'); } );
Have a look at the Conditional Tags page for all accepted functions.
Absolutely! You can add a name field to your Mailchimp top bar by using a simple code snippet to display the field and send the data to your audience. ` add_action( 'mctb_before_submit_button', function() { echo ''; }); add_filter( 'mctb_subscriber_data', function( $subscriber ) { if( ! empty( $_POST['NAME'] ) ) { $subscriber->merge_fields['NAME'] = sanitize_text_field( $_POST['NAME'] ); } return $subscriber; }); ` For more details, see our knowledge base article on adding a name field to Mailchimp Top Bar.
If you prefer not to show the notification bar on smaller screens, you can hide it using custom CSS. Adding the following CSS to your site will hide the bar on all screens smaller than 600px:
@media( max-width: 600px ) { #mailchimp-top-bar { display: none !important; } }
If you run into any issues or have questions about configuring your subscribe bar, please open a topic on the WordPress.org plugin support forums.