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;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.