WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] Include Custom Fields in Post E-mails (4 posts)

  1. EagleRock
    Member
    Posted 1 year ago #

    Hi,

    I am setting up a WordPress site to be used as an outage bulletin site for my company. We are looking to purchase the HTML version to have nicer e-mails sent out, but are working on a proof-of-concept using text. I am using the Advanced Custom Fields plugin to make creating posts easier, as all of our posts follow a standard format. Here's a snippet of our post content as an example:

    Status: [acf field="status"]
    
    Service Disruption Start Time: [acf field="startTime"]
    
    Service Disruption End Time: [acf field="endTime"]
    
    Location: [acf field="location"]

    The custom fields are automatically populated on the website itself and display correctly. However, when a status e-mail is sent out via Subscribe2, the custom fields are not populated, and the area where they should be (after the colons) are blank.

    Is there a way to add these custom fields into the body of the subscriber e-mail? I was unable to do this using the Subscribe2 Templates on the Admin Page, nor was I able to find where I could add this in the code. Many Thanks!

    Regards,

    Peter

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @EagleRock,

    This plugin is not familiar to me but it seems to work by registering a custom post type. (It may also register custom post taxonomies too but I can't be sure).

    The FAQs explains how you can extend Subscribe2 to include custom post types and taxonomies starting at the "How do I make use of the support for Custom Post Types" heading. In this case the post type is 'acf'. Try that and see if that helps.

  3. EagleRock
    Member
    Posted 1 year ago #

    @mattyrob,

    Thanks for your assistance! I actually was not able to get it to work over plaintext, but it is working as expected with the HTML preview. At least I know it will work once we purchase and install the HTML version of subscribe2. Thanks again!

  4. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @EagleRock,

    It looks like the custom fields are populated with short codes. As that's dynamic it'll probably not work well with plain text, should be fine in HTML though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.