Home › Forums › General Issues › Add a lot of custom fields to the_content › Reply To: Add a lot of custom fields to the_content
I don’t know why, but don’t work, sen me a error in the } before $content .= ob_get_clean();
i paste you here the start and the end of code
START
<?php add_filter( 'the_content', 'contenido_events_add', 0 );
function contenido_events_add( $content ) {
if ($post->post_type == 'sp-event')
global $post;
ob_start();
?>
<div class="row">
... and the rest of the html
... and field you want to add to content
END
<?php
$content .= ob_get_clean();
}
return $content
}
?>
This don’t work but i think is near to te solution, probably if you don’t check the code I pasted before this can be whit some error.
Thank you!
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.