WordPress.org

Ready to get started?Download WordPress

Forums

Thank Me Later
[resolved] Hyperlinked Comment URL not working since update (3 posts)

  1. footyblogger
    Member
    Posted 1 year ago #

    Hi,

    i've been using this plugin for a while with the following code to put a link to the post that a comment author made their comment on:

    Hi [name]

    Thank you for your comment at MyWebsite <a href="[snip]<?php $comment = get_comment($comment_ID, OBJECT); echo get_permalink($comment->comment_post_ID); ?>[/snip]">on this post</a>.

    Since the upgrade it has stopped working and using the shortcode [comment_URL] just inserts the line "http://www.mywebsite.com/uncategorized/sample-post-title/#comment-180" in to the email which is not hyperlinked.

    Can anyone advise on how to get a clickable link to the post someone commented on to appear in the email?

    Thanks

    http://wordpress.org/extend/plugins/thank-me-later/

  2. Brendon Boshell
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    Thank Me Later 3.0 removes support for PHP code in messages. All PHP code gets surrounded by [snip] and needs to be replaced with the relevant shortcode. To get the desired behaviour, you would need something like the following:

    Hi [name]
    
    [htmlonly]
    Thank you for your comment at MyWebsite <a href="[comment_url attr=1]">on this post</a>.
    [/htmlonly]
    
    [textonly]
    Thank you for your comment at MyWebsite. You can find your comment at the following URL: [comment_url]
    [/textonly]
  3. footyblogger
    Member
    Posted 1 year ago #

    That solved it, excellent stuff, thanks Brendon.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic