Background: I'm new to the Gutenberg block editor and I'm trying to develop a custom block theme. I'm using ACF to create custom blocks.
Problem: I'm creating custom blocks with the intention of displaying various custom post types. Posts display on the front end. In the Gutenberg page editor, the posts don't display when the block is.
I've determined this is because the have_posts() is returning false and thus, my loop isn't running.
I want to make a nice editing experience, so I need the posts to display in admin editing as well as on the front end.
Question: So I have a couple questions:
- Why does have_posts() return false in admin when it returns true on the front-end?
- How do I loop through my custom post types in order to get them to display on both the front and backend?