Home › Forums › Front-end Issues › Custom block working in back-end, but not in front-end › Reply To: Custom block working in back-end, but not in front-end
Thanks, @rootid – this turned out to totally be my problem too. I was echoing the content straight from the $post object like $post->post_content
. What fixed it was switching to echo apply_filters( 'the_content', $post->post_content );
.
The slightly misleading thing I found was that other blocks were appearing in post_content
, just not my ACF custom blocks – I guess because of the order in which they are added – this hindered my diagnosis of the issue though, which I had assumed was a problem with my render_template
path as the blocks were appearing correctly in the block editor.
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.