Viewing 2 replies - 16 through 17 (of 17 total)
  • @bigs38.

    I cannot get the PHP shortcode to return anything other than NULL using your code, I used:

    global $post_id;
    return get_the_post_thumbnail( $post_id, 'medium' );

    For me that worked on the front end of the blog and also in the emails.

    Thread Starter bigs38

    (@bigs38)

    It’s perfect, I have worked on your exemple to adapt it to my needs and it works very well now.

    A short exemple, if someone need to add a link to a gallery on to the Featured image:

    global $post_id;
    $exemple = '<a href="https://www.mysite.com/galerie/'.$atts[id].'">';
    $exemple .= get_the_post_thumbnail( $post_id, 'medium' );
    $exemple .= '</a><test>';
    return $exemple;

    Thank for your help and for the Subscribe2 plugin !!!
    Bigs38

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Custom shortcode in a post is interpreted as text in e-mail’ is closed to new replies.