• Resolved dxlwebs

    (@dxlwebs)


    Hi there,

    Im using your plugin for my site, it works perfectly in displaying the info i want it too but when i go to a page where there isnt any custom fields i get undifind function my code is below:

    $iata = CFS()->get(false, 42, array('format' => 'raw'));
    
    			if(!empty($iata)){ ?>
    
                <div class="afacts">
    
                <div class="afact">
                <div class="atitle">IATA</div>
                <div class="ainfo"><?php echo $iata; ?></div>
                </div>
    
                <div class="afact">
                <div class="atitle">ICAO</div>
                <div class="ainfo"><?php echo CFS()->get('icao'); ?></div>
                </div>
    
                <div class="afact">
                <div class="atitle">Operator</div>
                <div class="ainfo"><?php echo CFS()->get('operator'); ?></div>
                </div>
    
                <div class="afact">
                <div class="atitle">Airport Type</div>
                <div class="ainfo"><?php echo CFS()->get('airport_type'); ?></div>
                </div>
    
                <div class="afact">
                <div class="atitle">Coordinates</div>
                <div class="ainfo"><?php echo CFS()->get('coordinates'); ?></div>
                </div>
    
                </div>
                <?php }
    }

    https://www.ads-software.com/plugins/custom-field-suite/

Viewing 1 replies (of 1 total)
  • Thread Starter dxlwebs

    (@dxlwebs)

    Resolved it myself sort of by creating a post template where the info is only called when its needed rather than having it called everywhere

Viewing 1 replies (of 1 total)
  • The topic ‘Undifined function’ is closed to new replies.