cambro
Forum Replies Created
-
That worked and thank you!
I guess using a custom shortcode with the New User Notification is not possible at this time? Seems a bit odd.
Thanks for the help.
- This reply was modified 2 years, 1 month ago by cambro.
Thanks for the reply.
I created a new WP site and selected the stock Twenty Twenty-Four them. Then, I placed this code in the function.php.
function bnfw_shortcode_futuredate() {$future_date = date( ‘F j, Y’, strtotime( ‘+1 year’ ) );return $future_date;}
add_shortcode( ‘future_date’, ‘bnfw_shortcode_futuredate’ );I can use the shortcode in a webpage without any errors. However, when I place in a BNFW new member notification and test it by creating a new user, the email received does not render the date as expected but merely the “[future_date]” as seen below.
Site Title: My WordPress
Site Tagline:
Site URL: <redacted for post>
Site Admin Email: <redacted for post>
Current Date: April 13, 2024
Current Time: 12:57 am[future_date]
Is it fair to think that this should work within BNFW? If not, why?
Thanks
Update… I created a new WP site using one of the stock template options. I then figured out how to make a simple plugin. In that plugin, I place the HelloWorld functions as posted previously.
The shortcode behaves as expected on a web page. However, it simply displays the shortcode “[HelloWorld]” bit in the email notification rather than “Hello World” as expected. Not sure why.
Any ideas / suggestions?
Thanks