If you have a WordPress.com account, then you can use that or you can create a free account. Once you have connected Jetpack to WordPress.com, you need to visit Appearance » Widgets. Drag and drop Blog Subscriptions (Jetpack) widget to a sidebar and then click on Save button store your widget settings.
Hi simjonna,
Thanks for your reply. I think you have misunderstood my question. What I am looking for is the code to create a shortcode which returns the subscribe/unsubscribe link. It would be added to my theme’s functions.php and look something like this:
function bp_subscribe_shortcode() {
... logic to create a URL to subscribe, unsubscribe...
}
add_shortcode( 'bbp-subscribe-link', 'bp_subscribe_shortcode' );
It would accept one input: the ID of the forum, e.g.:
[bbp-subscribe-link forum_id=’557′]
It can then be placed in a page or a post etc.
Any help appreciated.
Thanks
Dennis
for
[bbp-subscribe-link forum_id=’557′]
this code (untested) should be close
function bp_subscribe_shortcode($attr) {
//must have a forum_id or we just return !
if (empty( $attr['forum_id'])) return ;
else $args['forum_id'] = $attr['forum_id'];
echo bbp_forum_subscription_link($args) ;
}
add_shortcode( 'bbp-subscribe-link', 'bp_subscribe_shortcode' );
coma back if that doesn’t work and you can’t fix it
Hi Robin,
Thanks for the suggested code. I tried it but it keeps returning nothing when specifying an existing forum ID. I checked that $attr contains the specified forum_id, but am unsure on how to troubleshoot bbp_forum_subscription_link().
Any help would be appreciated.
Thanks
Dennis
no problem, I’ll load to to my test site when I get a moment