Support » Plugin: Shortcode Exec PHP » Error 500 Create Short Code with URL Variable

  • Hi,

    I am having an issue creating a short code with this code. It works fine otherwise, I am just having an issue creating the short code. I believe the issue might be with the use of a URL with a variable.

    ` $webyelp = get_field(‘yelp’, ‘option’);
    if (!empty($webyelp)) {

    echo ‘<a href=”‘ the_field(‘yelp’, ‘option’); “><img src=”../reviewbadge/yelp.png” alt=”yelp” /></a>

    } else { echo “”;}
    Any idea what I’m doing wrong? Thanks a lot for your time!

Viewing 1 replies (of 1 total)
  • Hi,

    Please disregard, the problem has been solved. For those who are curious, simply wrap any html parts like this ?><a href=”<?

    use ?> at begining and >? at the end and everything will play nicely with the php in the short code.

Viewing 1 replies (of 1 total)
  • The topic ‘Error 500 Create Short Code with URL Variable’ is closed to new replies.