In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?

If using this plugin instead of the theme functionality, and in the same time except jquery from minification and grouping, it works: Quantity Field on Shop Page for WooCommerce https://wordpress.org/plugins/quantity-field-on-shop-page-for-woocommerce/ It seems that jQuery has to be excepted from minification and grouping because otherwise the code starting with this gives an error: <script type=”text/javascript”>jQuery(‘.products .post-10 … Read more

splitting the URL using jQuery

Not really a WordPress related question but you could do this // creates a object from the array, one of the properies (search) contains the query let url = new URL(‘https://dev/job/?job_id=jkdbsbd45JubJKAAASSYT’); // will create a object of all availalble query properites const urlSearchParams = new URLSearchParams(url.search); const params = Object.fromEntries(urlSearchParams.entries()); // remove ? and everything … Read more

Control attachments menu order with jQuery Sortable

To save the menu order use wp_update_post() with each attachment ID and its new menu position: $thisattachment = array(); $thisattachment[‘ID’] = $thisid; $thisattachment[‘menu_order’] = $new_menu_position; wp_update_post($thisattachment); EDIT – assuming these are already attachments and you’re updating them? Otherwise you have to insert the attachments first with wp_insert_attachment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)