Support

Account

Home Forums General Issues Links do not appear as links Reply To: Links do not appear as links

  • I thought the third paramenter in get_field is for the format – nevertheless, plain get_field(‘fld_teaser_content’) doesn’t return anything either whereas get_post_meta always returns the correct value?

    this is the whole function – hope it helps:

    
    add_filter( 'genesis_before_entry_content', 'custom_entry_content' );
    function custom_entry_content() {	
    	if ( !is_single() )
    		return;
    		
    	$id = get_the_ID();
    	if ( empty($id) )
    		return;
    			
    	$teaser_content = get_post_meta( $id, 'fld_teaser_content', true );
    	//$teaser_content = get_field( 'fld_teaser_content', $id, true );
    	
    	if ( empty( $teaser_content ) )
    		return;
    	
    	$html  = "\n\t"   . '<div class="teaser-box neutral-box">';
    	$html .= "\n\t\t" . '<div class="teaser-header"><h6><i class="icon-pushpin pull-right"></i>Hinweis</h6></div>';
    	$html .= "\n\t\t" . '<div class="teaser-content">' . sanitize_text_field( $teaser_content ) . '</div>';
    	$html .= "\n\t\t" . '<div class="teaser-footer">Bitte <a href="?page_id=38" title="Kontakt">kontaktieren</a> Sie uns für ein unverbindliches Gespräch.</div>';
    	$html .= "\n\t"   .'</div>';
    
    	echo $html;				
    	
    }