$is_preview() throwing undefined warning on front-end

Using Dynamic Render Templates for the first time. In my file for the flexible field, I have <?php echo ($is_preview) ? ‘is-preview’ : ”; ?> inside my wrapper div class=””. It all works great, but on the front-end when viewing source I’m getting <br /> <b>Warning</b>: Undefined variable $is_preview in ….

I tried searching support on here, and didn’t see any reference to this. I understand the value should be false since we’re not on the backend and nothing should be echoed. Just curious how to remove the output warning in the HTML.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer