Admin New Order: Autofocus on Search a product

This is a Backbone modal, wc-modal-add-products, defined in html-order-items.php and triggered by meta-boxes-order.js. You say you’ve marked the field autofocus. This StackOverflow answer proposed adding an onRender handler to the modal that finds autofocus and selects it: $(this.el).find(‘:input[autofocus]’).focus(); I don’t know where the best place to put this is, but if you find the WCBackboneModal … Read more

Remove /category/ from category (archive) page URLs (without using a plugin)

Please add this code in functions.php to remove the “category” text from permalink. function remove_category( $string, $type ) { if ( $type != ‘single’ && $type == ‘category’ && ( strpos( $string, ‘category’ ) !== false ) ){ $url_without_category = str_replace( “/category/”, “/”, $string ); return trailingslashit( $url_without_category ); } return $string; } add_filter( ‘user_trailingslashit’, … Read more

How i make a shortcode from this code

To make the inteire file a shortcode its at least something to considered, for that I would call the page instead. However a short code can be done like this. paste it in your functions.php if (! function_exists(‘my_custom_shortcode_with_the_name_I_had_choosen’)) { function my_custom_shortcode_with_the_name_I_had_choosen(){ … your code …. } } add_shortcode(‘whatever_name’, ‘my_custom_shortcode_with_the_name_I_had_choosen’); to a few more information check … Read more

WordPress Plugins Error

This could be due to several different reasons. The quickest answer is to ensure your server is running PHP 7.4+ and the cURL extension is enabled. If the problem persists, suggest reading through the support forums to see if you can find information relative to your situation.

Block validation failed

As Tom pointed out, without the actual code of the block (specifically the save function) it is impossible to tell you exactly what the issue is. That said, if you compare what was generated by the save function and what was in the post body, you’ll see that there is content missing in each of … Read more