Support

Account

Home Forums General Issues Show message if link field is empty Reply To: Show message if link field is empty

  • 
    
    function notna_slika_link() { 
    
    	$link = get_field('prikaz_notne_slike');
    	if ($link) {
    		$link_url = $link['url'];
    		$link_title = $link['title'];
    		$link_target = $link['target'] ? $link['target'] : '_self';
    	
    		return
    	
    			'<div class="pdf-btn-out">
    				<div class="pdf-btn">
    					<div class="pdf-inner">		
    			
    			<a href="' . $link['url'] .'" target="' . $link['target'] .'">' . $link['title'] .'</a>
    			
    					</div>
    				</div>
    			</div>'
    			
    			;
    	} else {
    		/// return what you want if no link is entered
    	}
    	
    }