Last active
September 26, 2016 23:38
-
-
Save cliffordp/f35669e382c6dcb2088ad8161cd63289 to your computer and use it in GitHub Desktop.
Insert Page ID# 1572's content in top of Event Tickets / Event Tickts Plus email messages. Creates an easy-to-manage way to customize messaging using the WordPress Visual Editor instead of having to code HTML or keep up with any template override changes. Screenshot: https://cl.ly/103r1O0M0o32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Insert Page ID# 1572's content in top of Event Tickets / Event Tickts Plus email messages | |
* Creates an easy-to-manage way to customize messaging using the WordPress Visual Editor instead of having to code HTML or keep up with any template override changes. | |
* Screenshot: https://cl.ly/103r1O0M0o32 | |
* | |
* !!! MUST CHANGE POST ID to your page's Post ID!!! | |
* Recommended to leave this post unpublished (Draft or Pending Review) | |
* Recommended to give it a descriptive post title so it doesn't get accidentally deleted or edited | |
* Note: using post ID instead of getting page by slug (might be more user-friendly) because https://developer.wordpress.org/reference/functions/get_page_by_path/ returns FALSE for "private" pages/posts (and presumably Draft or Pending Review as well) | |
* | |
* Could use either `tribe_tickets_ticket_email_top` or `tribe_tickets_ticket_email_bottom` action or have 2 separate pages with different content. | |
* | |
* From https://gist.github.com/cliffordp/f35669e382c6dcb2088ad8161cd63289 | |
*/ | |
add_action( 'tribe_tickets_ticket_email_top', function() { // could use tribe_tickets_ticket_email_bottom instead | |
echo get_post( 1572 )->post_content; // change to your Page ID | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment