Delete custom field
-
Hi,
I have multiple custom fields named Awards in the following format
https://somelink.com/image.jpg&https://somelink.com
. I use the below code to create a little gallery. I would like to use the<span class='delete'><a href=".'#'." title='Delete!' />[x]</span>
to delete each individual image. I m not sure how to do this. Can anybody help?<?php $awds = get_post_meta($post->ID, "Awards", false); ?> <?php foreach($awds as $awd) { $tawd = explode("&", "$awd"); $tawdd = $tawd[0]; $tawddd = $tawd[1]; echo '<a href="'.$tawdd.'">'.'<img width="200" src="'.$tawddd.'" alt="alt"/>'.'</a>'; echo "<span class='delete'><a href=".'#'." title='Delete!' />[x]</span>"; ?> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Delete custom field’ is closed to new replies.