Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Post Email Notify #68

Open
sharmstr opened this issue Nov 2, 2015 · 19 comments
Open

New Post Email Notify #68

sharmstr opened this issue Nov 2, 2015 · 19 comments

Comments

@sharmstr
Copy link

sharmstr commented Nov 2, 2015

I added some functionality to my site that will email the authors followers when they publish a new post. I was using the Subscribe Author plugin, but decided to tap into BP Followers instead. One less plugin and one less button on the frontend. The code is here: https://gist.github.com/sharmstr/bc54a0e906c6bd8b658b

I'll probably add a BP Notification as well.

@landwire
Copy link

landwire commented Nov 2, 2015

That's great. So will this live as its own plugin or will it be committed to the buddypress-followers plugin? I guess at the moment I would have to copy the above code into my functions.php or something. Is that right? I assume it will work with any post type? BP Notification would be great...

@sharmstr
Copy link
Author

sharmstr commented Nov 2, 2015

I'm not making a plugin out of it. I have it in my child theme's functions.php file. You select what post types to alert on by going into the settings page I've created for it.

@sharmstr
Copy link
Author

sharmstr commented Nov 2, 2015

I was only posting here to make people aware of it. If you have questions, please post them on gist page since this is NOT supported by r-a-y

@r-a-y
Copy link
Owner

r-a-y commented Nov 2, 2015

Cool, thanks for posting this, @CoLabsAdmin.

I've added a link to this issue on the wiki.

I think your code is a good start, but I want to be very careful before introducing email notifications. People will want to turn them off and will want other things added like activity updates, group creation, forum posts, etc.

Screen notifications is tricky at the moment because BuddyPress doesn't have a dedicated screen notifications settings page and some will want to be able to disable screen notifications as well.

@sharmstr
Copy link
Author

sharmstr commented Nov 2, 2015

Totally agree with you.

(also wanted to mention that your code is some of the best I've seen.)

@espellcaste
Copy link
Contributor

That's pretty cool @CoLabsAdmin ! Congrats!

@r-a-y Do you see in the near future a scream notifications settings page as you mentioned in BuddyPress?

@r-a-y
Copy link
Owner

r-a-y commented Nov 2, 2015

Do you see in the near future a scream notifications settings page as you mentioned in BuddyPress?

I've created a BP ticket for this: https://buddypress.trac.wordpress.org/ticket/6712.

When I get to screen notifications support for BP Follow, I'll also try and offer backward-compatibility support to BP 1.9. Depends on how much work I'll have to do for this though ;)

@espellcaste
Copy link
Contributor

Understand! =)

@sharmstr
Copy link
Author

sharmstr commented Nov 2, 2015

I've added BP notifications. I thought about utilizing the follow component that's already registered with bp followers, but decided to keep it separate. Its a first pass but seems to be working okay. I havent added any routines to clear the notifications table if a user is deleted and there is no on/off switch in the settings, so in most respects, this is basic code.

@aswain1
Copy link

aswain1 commented Mar 8, 2016

Does the BP Notifications component support status updates, or does the user have to actually make a blog post?

@sharmstr
Copy link
Author

Its for Posts

@yumnihon
Copy link

Hi all,
I am new member, i am using plugin buddypress-followers. I get the notify email from followers when they publish a new post in admin wordpress.
How to get the notify email from followers when they publish a new Activity on their Activity Stream.

@SerenityNrrd
Copy link

Hoping you guys are still on this... do you know if it works for custom post types too? I added the code and everything but it doesn't seem to be working for my custom post type called casting-call. no worries if its not.

@IudazaRoadrunner
Copy link

Hy colabsadmin. I added this code in functions.php but it doesn't work I have a custom post caled "video" http:https://i.imgur.com/pScQpDX.png

@Martin128
Copy link

It works for me but just from back end. It is possible to fix?

@zzbeck
Copy link

zzbeck commented Jan 31, 2018

Anyone know if this is still possible? I can't find a working solution anywhere.

@mrjarbenne
Copy link

Have you tried the snippet? Others seem to be using it successfully. An addition to the functions.php file can be easily accomplished via a child theme.

https://developer.wordpress.org/themes/advanced-topics/child-themes/#how-to-create-a-child-theme

Otherwise, there are a number of plugins that accomplish an email notification upon new post creation. Jetpack has a subscribe by email functionality. Postmatic does as well if you want to avoid jetpack.

@zzbeck
Copy link

zzbeck commented Jan 31, 2018

Yes, I have tried the snippet. I don't know if it's because I'm using WP Multisite, that It won't work.

@mrjarbenne
Copy link

If you want it to work on multiple sites, you might want to convert the snippet to a plugin. Code for a functions.php file is basically a plugin without the requisite header content. Here’s a tutorial on creating a functionality plugin.

http:https://wpcandy.com/teaches/how-to-create-a-functionality-plugin/#.WnJLXHByaEc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests