I’m using ACF’s functionality to create a custom block. I’ve got everything working great using a template file.
The block content has an image wrapped in an A tag with an href. However, in the editor I would like to omit the A tag so that the user does not accidentally click on it in the block editor and get sent to another URL.
In short, is there some code/conditional I can put in my block render template so that my block renders one way in the block editor and a slightly different way in the front-end? A function of some kind? Or perhaps something in the $block object I can conditionalize against?