I have a custom WordPress field named “post_display_breadcrumbs” which is a boolean, registered through custom.php.
I want to access it in my single.html to hide a <div> if post_display_breadcrumbs is false.
Here is what I currently have which does not work:
<div cms-function="code" cms-function-type="style" cms-function-code="get_post_meta( get_the_ID(), 'post_display_breadcrumbs', true ) === false" cms-function-style="display: none;">
<div class="breadcrumbs mb-3" cms-breadcrumbs="categories" cms-breadcrumbs-item="> a:nth-of-type(1)" cms-breadcrumbs-separator="> span:nth-of-type(1)" cms-breadcrumbs-last-item="> span:nth-of-type(3)" cms-breadcrumbs-last-item-name="> span:nth-of-type(3)">
<a href="#">Link 1</a>
<span> » </span>
<a href="#">Link 2</a>
<span> » </span>
<span>Last Link</span>
</div>
</div>
Ideally what I would like to do is check if post_display_breadcrumbs exists & is true (1), then display the <div class=”breadcrumbs”>.