Conditional Statements for Catalog Visibility?
-
Does anyone know how you would go about using conditional statements for displaying content via “Catalog visibility?”
What I’m wanting, is that if “Catalog Visibility” is set to “Hidden” or just “Catalog/Search” (whichever is easiest) then there are certain parts of a page/post that I don’t want to display.
Usually, I would do something like this:
<?php if(has_term( 'myterm', 'product_tag' )) { ?> Here's my content <?php } else { ?> <?php } ?>
What I’m wanting is something along those lines, something like:
<?php if(IF CATALOG VISIBILITY IS SET TO CATALOG/SEARCH OR HIDDEN ) { ?> Here's my content <?php } else { ?> <?php } ?>
I can’t seem to find anywhere or figure out how to do this.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Conditional Statements for Catalog Visibility?’ is closed to new replies.