Ben bir özel alan bir şey içine veya eğer girmiş denetler deyimi boş bırakıldı değilse, sadece basit bir PHP yazmaya çalışıyorum.
when it is blank it is meant to not print anything to the page, if something is set in the custom field then it should create a li element with an a tag inside of it.
Burada benim kod şimdiye kadar:
<ul class="externalLinks">
<? $emptycheck = get('linkname',2,1,0);
if (isset($emptycheck)){ ?>
<li><a href="<? echo get('targethref',2,1,0); ?>"><? echo get('linkname',2,1,0);?></a></li>
<? } else { '' } ?>
<li><a href="<? echo get('PDFdownload'); ?>">Download a PDF of this project</a></li>
</ul>
The custom fields in this case are set by the wordpress admin (through the flutter plugin). The issue I am having is simply that if the custom fields are left blank an empty
<li><a></a></li>
oluşturulur.
('linkname', 2,1,0) almak açıkçası alan içeriği (bu kısım işleri) döndürür.
Herhangi bir fikir çok takdir.
Thanks, Jannis