Adding text link to "subscribe" button of subscribe by email shortcode


I am trying to add link to the subscribe button in the subscribe by email shortcode to a specific page from my website. Basically I am trying to take the new subscriber to the free gift page.

I have found this <input type="submit" class="sbe-shortcode-form-submit" name="submit-subscribe-user" value="<?php echo apply_filters( 'sbe_shortcode_button_text', __( 'SUBSCRIBE', INCSUB_SBE_LANG_DOMAIN ) ); ?>"> in the /wp-content/plugins/subscribe-by-email/front/shortcode.php but I cannot create text link around 'SUBSCRIBE' button.

Is it possible that you can help me here?


  • Tyler Postle
    • CGO

    Hey Vladimir,

    Hope you're doing well today!

    So are you basically wanting to redirect the user to a page of your choice after they subscribe?

    This functionality isn't currently available in the plugin, but if that's what you're after I could flag one of our coding experts and see if it's something we can provide a quick snippet for or not :slight_smile: at the least we'll be able to provide some direction on how to add it.

    Look forward to hearing back!


  • CodeWeb Solutions
    • Site Builder, Child of Zeus

    Hi Tyler,

    Yes, that is exactly what I am trying to do since I think this is sort of standard for other similar plugins. Offering an incentive to a visitor for subscribing is a common practice, I assume.

    So, what I need, basically is here on line 184 to add some extra code between ' ' where 'SUBSCRIBE' is so that I can lead the subscriber to certain page on my website, something like a'SUBSCRIBE/a.>.

    Many thanks,

  • Panos
    • SLS

    Hello Vladimir ,

    Hope you had a nice weekend!

    Since the plugin doesn't provide this feature we could find a way around this and it would be better if we didn't modify plugin files if possible, since our changes will be lost on next update and should have to repeat the same hack again.

    The simplest way would be to change the "Thank you" message and place a link to the desired page there. This could be possibly done by changing the translation of this text by using the Loco Translate plugin. Though this does not require any file editing it will not redirect after form submission so I suppose you would prefer something else :slight_smile:

    The second easiest way would be with the use of some javascript. I would recommend to use a plugin where you can insert Javascript code like Simple Custom CSS and JS or any smilar. In the JS field of the plugin you can insert the following code:

    jQuery( document ).ready( function(){
    	jQuery( '#sbe-shortcode-subscribe-form' ).attr("action","");

    Make sure you replace the url of the page you want it to redirect. As you can see the script is very small and will not affect your page load, but if possible try and insert it in the footer if the plugin offers this option.

    If none of these options covers your needs we are left only with the option to make some modifications to plugin's files. Please let us know how would you like to go on with this!

    Looking forward to your reply!

    Kind regards,

  • CodeWeb Solutions
    • Site Builder, Child of Zeus

    Hi Panos,

    Thanks for the offered options. I have tried the second option and it works like a charm. You are right about plugin modification: it is not clever since the changes will be lost during the update process.

    I declare this ticket as solved and closed :slight_smile:

    Best Regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.