Editing the term_order field

Did it yourself. If someone needs: // Adding a field to sort on the category edit page add_action( ‘product_cat_edit_form_fields’, ‘product_cat_edit_category’, 5 ); function product_cat_edit_category( $term ) { $term_order = get_term( $term->term_id, ‘product_cat’ ); ?> <tr> <th scope=”row”><label for=”description”>Сортировка</label></th> <td><input type=”text” name=”term_order” value=”<?php echo $term_order->term_order; ?>”></td> </tr> <?php } // Update term_order value when saving taxonomy … Read more

Javascript Tab Gallery with Advanced Custom Fields

Fixed it! This is the resulting code: <?php $images = get_field(‘extra_photos’); if( $images ): ?> <div class=”row2″> <?php foreach( $images as $image ): ?> <div class=”column2″ > <img src=”https://wordpress.stackexchange.com/questions/337143/<?php echo $image[“url’]; ?>” alt=”https://wordpress.stackexchange.com/questions/337143/<?php echo $image[“alt’]; ?> ” onclick=”myFunction(this);”/> </div> <?php endforeach; ?> </div> <!– The expanding image container –> <div class=”container2″> <!– Close the image … Read more

Make wp_editor required

I can’t find any documentation that will allow adding any tag attributes to the wp_editor except for the id. You’ve got two options that I can think of. The first is to include a jQuery dependent (or not) javascript file which will add the required attribute to the editor textarea after the DOM is fully … Read more