This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the current tag | |
$tag = get_queried_object(); | |
// Check if the tag exists | |
if ($tag) { | |
// Get ACF repeater field values for the current tag | |
$repeaterField = get_field('product_tag_faq', 'product_tag_' . $tag->term_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the current category ID | |
$category_id = get_queried_object_id(); | |
$term = get_queried_object(); | |
$repeaterField = get_field('category_faq', 'product_cat_' . $category_id); | |
// Check if repeater field has values | |
if ($repeaterField) : | |
echo '<ul class="accordion accordionjs">'; | |
$counter = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to validate two fields that depend on each other with Yup | |
```js | |
const schema = yup.object().shape({ | |
propCategory: yup.object().shape({ | |
label: yup.string().required(), | |
value: yup.string().required(), | |
icon: yup.string().required(), | |
}), |
OlderNewer