WordPress.org

Ready to get started?Download WordPress

Forums

Subscriptions shortcode for Jetpack
[resolved] Change text of 'Subscription' module inside [jpsub] (13 posts)

  1. vus
    Member
    Posted 1 year ago #

    Hi

    I'm hoping to be able to add the Jetpack subscription module in at text widget because I need to be akble to add some more code along side with the subscription module.

    However when I use this [jpsub] it shows up with the default text and settings. I need to have the text i an other language. How do I change this?

    Thanks in advance.
    Regards.
    Claus

    http://wordpress.org/extend/plugins/jetpack-subscriptions-shortcode/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I am afraid the shortcode doesn't offer such options yet. I will think about adding more parameters in a future version.

    In the meantime, you could use the standard Subscription widget in your sidebar, and add your custom code in a text widget above the Subscriptions widget.

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Jetpack now includes its own Subscription shortcode:
    [jetpack_subscription_form]

    I would recommend that you switch to this one.

  4. booth_1
    Member
    Posted 1 year ago #

    Is there a way to change the Jetpack shortcode text? From this (my Travel Blog) to an alterntive?

    Cheers
    Tyrhone

  5. wcfphoto
    Member
    Posted 1 year ago #

    Tyrhone,

    I am just a beginner at this, but in the file:

    jetpack/modules/subscriptions.php

    I located this section:

    function defaults

    where I found:

    'title' => esc_html__( 'Subscribe to Blog via Email', 'jetpack' ),
    'subscribe_text'=> esc_html__( 'Enter your email address to subscribe to this blog and receive notifications of new posts by email.', 'jetpack' ),
    'subscribe_button' => esc_html__( 'Subscribe', 'jetpack' ),
    'subscribe_logged_in' => esc_html__( 'Click to subscribe to this blog and receive notifications of new posts by email.', 'jetpack' ),
    'show_subscribers_total' => true,

    I changed the text 'Subscribe to Blog via Email' and 'Enter your email address to subscribe to this blog and receive notifications of new posts by email.' to something that better suited my needs and so far nothing is broken ... yet.

    The one thing I haven't figured out is how to display the total number of subscribers.

    I'm sure someone will let me know if there is something wrong with this method,

    WCF

  6. booth_1
    Member
    Posted 1 year ago #

    Thanks WCF, away from my pc but that sounds good. I will give it a try tonight. Appreciate the info and will let you know how it goes.

    Ty

  7. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I'm sure someone will let me know if there is something wrong with this method,

    @wcfphoto Your method is correct, thanks.

    The one thing I haven't figured out is how to display the total number of subscribers.

    You can add a parameter to the shortcode, like so:

    [jetpack_subscription_form show_subscribers_total="true"]

  8. booth_1
    Member
    Posted 1 year ago #

    It worked! Thanks a lot WCF.

  9. jkshay
    Member
    Posted 1 year ago #

    I had the opposite problem as booth_1 - I wanted to hide the number of subscribers. I tried [jetpack_subscription_form show_subscribers_total="false"] based on inverting Jeremy's suggestion above, but had no luck.

    I modified the jetpack/modules/subscriptions.php file and added echo $show_subscribers_total; and saw that it was outputting a 1.

    I then tried [jetpack_subscription_form show_subscribers_total="0"] and successfully hid my subscriber count.

    Wanted to point this out in the event anyone else ran across this issue.

  10. turtlestravel
    Member
    Posted 1 year ago #

    We tried to change the text of the [jetpack_subscription_form] using the method described by WCF, but when we did, it crashed our entire site (htttp://turtlestravel.com)! It started returning a Server Error, and we couldn't access the WP Dashboard or any part of the blog. Only when we reverted back to the original text was it all fixed. Any idea why this would have happened? Were we editing the file in the wrong place/section? We were doing it via the Bluehost C-Panel within wp-content...seemed to be the exact path wcfphoto had referred to.

  11. OldUncleMike
    Member
    Posted 9 months ago #

    Just as a quick update you can set any of the parameters in the shortcode. So to change the wording use:
    [jetpack_subscription_form subscribe_text="Give us your email address to subscribe and receive get told of new stuff by email."]

    Much safer than hacking the PHP

  12. turtlestravel
    Member
    Posted 9 months ago #

    Thanks for the tip OldUncleMike, we will have to give that a shot!

  13. booth_1
    Member
    Posted 9 months ago #

    Thanks OldUncleMike, that is an excellent tip!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.