• Ive added a theme options to my custome wordpress theme. I added a series of links in my footer. I would like to add a command into either my options page, or my template for in case the field is empty to show a default link. Here is an example of my code:

    <?php if( get_option($shortname."_eliteaffiecu1") && get_option($shortname."_eliteaffiect1") && get_option($shortname."_eliteaffieci1") ): ?>
    <a>" target="_blank" title="<?php echo get_option($shortname."_eliteaffiect1"); ?>"><img src="<?php echo get_option($shortname."_eliteaffieci1"); ?>" title="" alt="" width="50px" height="60px" border="0" class="img" hspace="0" vspace="0" /></a><?php endif; ?>
Viewing 1 replies (of 1 total)
  • have you tried:

    <?php if( ??? ) : ?>
    <a ... your options link code ... /a>
    <?php else : ?>
    <a ... default link ... /a>
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Theme Options: If field is empty’ is closed to new replies.