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’re excited to announce we've released Composer support for installing ACF PRO.
— Advanced Custom Fields (@wp_acf) January 31, 2023
🎉 #ComposerPHP fans rejoice!
✨ Please see the release post for all the details and full instructions. https://t.co/ebEfp61nlR
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.