jcockroft64 / sierrahiking

Contains all the raw files for sierrahiking.net
GNU General Public License v3.0
2 stars 0 forks source link

Create a mailing list based on subscribers #87

Open jcockroft64 opened 1 year ago

russellelliott commented 1 year ago

Site Content Notifications

Notify users whenever new site content is posted.

Better Notifications from WP

Website: https://betternotificationsforwp.com/

Info Article: https://www.wpbeginner.com/plugins/how-to-get-email-notification-for-post-changes-in-wordpress/#bnfw

Plugin Link: https://wordpress.org/plugins/bnfw/

Youtube Video: https://www.youtube.com/watch?v=MxPUyRZPJ1Q

This plugin enables notifications to be sent when any site content is added or modified, like posts, pages, comments being added or modified.

All users of any role receive emails of site content being added or updated.

Can also send email to post author to notify them their post has been updated. This can be done in the add new notifications menu, select “Send this notification to the Author only”

Newsletters

Send subscribers newsletters of site content, events, etc.

The Newsletter Plugin

Plugin Link: https://wordpress.org/plugins/newsletter/

Website: https://www.thenewsletterplugin.com/

Can set all Wordpress users as subscribers to newsletter: https://www.thenewsletterplugin.com/documentation/addons/extended-features/wpusers-extension/

Automatically adds users to list upon them registering as well as already registered users.

Create a blog page for all sent newsletters: https://www.thenewsletterplugin.com/documentation/addons/extended-features/archive-extension/

No limit to amount of newsletters or how many recipients.

russellelliott commented 1 year ago

I’ve installed the “Better Notifications for WP” plugin and added these 6 notifications

Some of the shorcodes will produce links. When formatting in HTML, these can be better formatted by wrapping them with <a></a> tags: Link Text. This was used for the post/page link in question being added, modified, or a comment added to it

Relevant Shortcodes; can be found by selecting the specific one on the dropdown of this page: https://betternotificationsforwp.com/documentation/notifications/shortcodes/

Or by clicking the “Get Shortcodees” link for the notification menu inside the plugin menu.

New Post/Page: https://betternotificationsforwp.com/documentation/notifications/shortcodes/?notification=new-post

New Comment: https://betternotificationsforwp.com/documentation/notifications/shortcodes/?notification=new-comment

All notifications can be viewed by going to Notifications -> All Notifications

russellelliott commented 1 year ago

Installed the Newsletter Plugin You can view an overview/tutorial of the plugin in the "Welcome" section In the "Settings" section, you can configure which email the newsletter is sent from Installed the Addon manager Added the WP Registration Addon

Plugin settings are under Newsletter -> WP Users Addon

You mentioned that people with the subscriber role should be subscribed to the newsletter. Here's the settings I configured in the plugin:

More info on the plugin:

Imported the existing users as subscribers

FAQ: https://www.thenewsletterplugin.com/faq

The plugin also created a page called "Newsletter" which will house all the newsletters that have been sent https://www.sierrahiking.net/newsletter/

russellelliott commented 1 year ago

Post/Page Link Issues Fixed

Fixed the link to the post added/updated from the "Better Notifications from WP" plugin. Added the sierrahiking.net to the front so it actually went to the page on the site with that slug. Without adding the domain, it tried going to a web doc link.

More info about webdoc links: https://www.reddit.com/r/techsupport/comments/qd02n0/what_is_an_xwebdoc_url/ https://www.dropboxforum.com/t5/Delete-edit-and-organize/latest-email-from-dropbox-contains-x-webdoc-links-that-don-t/td-p/559514

Here's the modification I made Before:After: Post Slug: <a href="[post_slug]">[post_slug]</a> After: Permalink: <a href="[permalink]">[permalink]</a>

An explanation of the issue: Permalink: a full link to the post. Doesn't require adding the site domain or anything else to link to the page properly Slug: the end of the url. Not very useful without the domain of the site. Won't link to the page without the proper domain and other preliminary link material.

Site Content Not Displaying in Email

Also, I had the email notifications for added/modified site pages/posts include their content via a shortcode Links don't seem to work; the host seems to be some IP address rather than sierrahiking.net, in that the url is like

https://xxx.xxx.xxx.xxx/some-slug rather than https://sierrahiking.net/some-slug. This could be attributed to the fact that like the slug, the links are relative. This works perfectly in the context of being within the domain of the site, but not so much when outside of it, as is the case of making emails including site content. A way to fix it in HTML is to add an iframe with the source attribute being the domain. From there, all relative links will work properly. Here's what it would look like and how to write it in HTML.

<iframe src="https://sierrahiking.net" height="200" width="300" title="Iframe Example">
<a href = "../2022/12/11/trip-summary-jmt-northern-extension/"></a>
</iframe>

Unfortunately, there isn't a way to add iframe into email. There doesn't appear to be an alternative. https://www.reddit.com/r/CodingHelp/comments/c1keuz/html_iframe_alternative_for_email/

So, I removed the shortcode that displays the content of the post/page for all notifications. I do certainly see emails that include pictures and links, but that could be figured out later.