It’s annoying when you keep displaying newsletter subscription forms to your existing email subscribers.
To hide the forms from existing subscribers:-
Open the Noptin settings page and toggle the “Hide From Subscribers” switch.
That’s all! Your existing email subscribers will no longer see any subscription forms, checkboxes, or popups.
However, subscribers that you imported from another system or website will still see the forms. This is because different newsletter systems use different cookies to identify subscribers.
There are three different ways to overcome this depending on what system you used to collect those subscribers.
- Setting an extra subscription cookie.
- Using URL variables.
- Using HTML.
Setting an Extra Subscription Cookie
If the other email service lives on the same website as Noptin, you can add their cookie to Noptin via the Noptin settings page.
If you do not know the name of the cookie, get in touch with the developers of the plugin and they will help you out.
By setting this cookie, subscribers who signed up ( or sign-up ) via the other system will not see any Noptin subscription forms. Similarly, subscribers who sign up via Noptin will not see the other service’s opt-in forms.
Hiding Opt-In Forms using URL Variables
If the other service does not live on the same website as Noptin, you can not use cookies to identify existing subscribers.
This is because cookies can only be accessed from the website that they were set.
You can however use a special URL variable to hide opt-in forms from visitors who signed up using such a service.
When you append the noptin_hide
query variable to any URL, email subscription forms will not show up on the URL (or any URLs that the visitor opens during the session).
Hiding Opt-In Forms Using HTML
If the above fails, or if you need your subscribers to mark themselves as subscribed, you can use any clickable HTML element that has a ‘noptin-mark-as-existing-subscriber
‘ class.
Whenever someone clicks on the element, Noptin assumes that they are already subscribed to your newsletter.
Now all you have to do is set Noptin to hide opt-in forms from existing subscribers and they will no longer see any newsletter subscription forms for 30 days.
Hiding all forms except the homepage form
Use the following PHP code snippet always to show the homepage form to all subscribers even if you hide other forms from existing subscribers.
<?php
// Add filter to show optins on the homepage.
add_filter(
'noptin_should_show_optins',
function( $show ) {
if ( is_front_page() ) {
$show = true;
}
return $show;
}
);
Tip:
Not sure how to add a PHP code snippet to your site? Consider using the Code Snippets plugin.
Leave a Reply