WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode Exec PHP
Error 500 Create Short Code with URL Variable (2 posts)

  1. andybenson129
    Member
    Posted 11 months ago #

    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!

    http://wordpress.org/plugins/shortcode-exec-php/

  2. andybenson129
    Member
    Posted 11 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags