Closed aj-fick closed 3 years ago
Did you use the_content filter on your output? @php apply_filters('the_content', $post->post_content); @endphp for example?
This is the markup for the page I'm attempting to output on:
@extends('layouts.hero')
@section('content')
<main class="container">
{!! get_the_content() !!}
</main>
@endsection
So, unless I'm misunderstanding, I'm outputting the content via the get_the_content()
function. And I should note, that other blocks on that page, standard built-in WP blocks, are working.
I see, as noted in these docs https://developer.wordpress.org/reference/functions/get_the_content/, get_the_content() does not use the the_content filter. I think that is the reason your block does not render. I'm not sure why the other built-in blocks are working, I have not looked into that yet.
@robmeijerink 🤦🏼 Thank you, That was precisely my issue.
I've created a block that seems to be working in the editor as expected, however it does not display on the front end of the website at all. Instead of seeing the markup I've created, I see the following comment:
All of the details within that comment are correct, but there's no HTML. Below is the code in my block:
This markup is visible in the editor and is styled appropriately.