-2

I am using this plugin https://wordpress.org/plugins/emailcoauthoronpost/ in my website. This plugin shoots an email to the author of the post with a link to my website. But I need to send the permalink of the post itself. So I need to embed some php code in the email body at the backend. Please see the snapshots.

Current Version enter image description here

My Requirement

enter image description here

2

Looking at the Other Notes of the plugin, you can use one of the variables to insert the post url.

$post_url - Replaced with the URL of the post which was published

Edit:

You would just add the $post_url variable within your body field.

<a href="$post_url">$title</a>

5
  • Hey, thanks Greg...but how do I use it in Email body field ? Its a php variable...I think if just write <a href = "<?php echo $post_url ?>"> Post Link </a> in the Email Body field its not gonna work...what to do you think @Greg ?
    – Saif Islam
    May 11 '16 at 14:25
  • 1
    @SaifMdTowfiqIslam - Updated the answer to show the example. It's doing a str_replace('$post_url', get_permalink(), $body); to swap it for the permalink. May 11 '16 at 14:34
  • yeah..should work...I will test it and then get back to you...thanks anyway...cheers man
    – Saif Islam
    May 11 '16 at 14:36
  • If this worked for you, make sure to close the question by accepting an answer. May 13 '16 at 12:19
  • 1
    yeah, sure...i asked my customer to test it..i will update you as soon as i get the feedback..no worries man..cheers
    – Saif Islam
    May 13 '16 at 18:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.