conditions not work after removing url
-
Hi,
I added a url field for link with condition like this
<?php if ($attributes['uni-profile-link']){ ?> <a href="<?php echo esc_url($attributes['uni-profile-link']); ?>" <?php if ($attributes['uni-profile-link-target']) { echo 'target="_blank"'; } ?>><?php } ?> <?php echo $attributes['uni-profile-name']; ?> <?php if ($attributes['uni-profile-link']){ ?></a><?php } ?>
The target toogle field work and when I disable target toogle the target attribute remove from the frontend. But once I add a url and then later remove that url from the url field, the anchor tag with old link not get removed in frontend, it remains there, when url is blank the if condition
<?php if ($attributes['uni-profile-link']){ ?>
Should work , but its not work, its works only if initially I have kept it blank, once I add a url, it always remain even if I remove and make it blank later.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘conditions not work after removing url’ is closed to new replies.