I have the following php statement:
<?php if(in_array(get_theme_mod('navbar_position'), array('under-header', 'bottom-of-header'))) { ?>
I'd like to convert it for use with Twig (I'm using twig to build a wordpress theme), I have found this code snippet but not too sure how to adapt it for what I need:
{% if myVar in someOtherArray|keys %}
Would it be something like this:
{% if theme.theme_mod('navbar_position') in 'under-header', 'bottom-of-header'|keys %}
...a bit of a stab in the dark.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With