Sometimes you need to alter a lot of products, or create extra options. Even if bulk edit could do it and you max to editing 200 pages at once, it is still a tedious job vulnerable for human error. You need a script. The snippets below will not fix your job but give you the […]
In a situation where you want the shipping costs determinined by a shipping class to apply for all products in the cart (and not use the highest price).
# Simple 301 Redirects – Bulk Check # Upload your CSV and verify every redirect is working. Workflow Requirements 1 Upload the plugin * WordPress installation 2 Activate the plugin * Administrator rights 2 Open admin page: ‘Bulk Redirect’ under tools * CSV file 4 Upload CSV * Mouse to press Run 5 Press Run […]
If you dived into ‘How to compile WordPress 5.0 twentynineteen sass files you might mis the sourcemaps for the style.css. The sourcemaps are not generated by any of the commands without a small adjustment. “scripts”: { “build:style”: “node-sass style.scss style.css –source-map true –output-style expanded && postcss -r style.css”, “build:style-editor”: “node-sass style-editor.scss style-editor.css –output-style expanded && […]
WordPress 5.0 is out! and it does not only come with Gutenberg but also with the new theme twentytwenty theme for WordPress. The theme is brilliant in its simplicity but that does not bring much elegance. So what if you want to change the styling? enhance or expand it? How would you start?. There are […]
To highlight search terms in the search results you can use the code below. Additionaly you will need to give search-highlight some special properties in your style sheet. // highlight search terms function highlight_results($text){ if(is_search()){ $keys = implode(‘|’, explode(‘ ‘, get_search_query())); $text = preg_replace(‘/(‘ . $keys .’)/iu’, ‘<span class=”search-highlight”>\0</span>’, $text); } return $text; } add_filter(‘the_content’, […]
By default WordPress adds scripts by using the type attribute enqueing styles and scripts, the latest html validators throw a warning because this is redundent/ unnecessary Exmaple Here is an example of the default way WordPress includes scripts
In this situation we want a custom field on checkout which has a jQuery Date selector: /** * enqueue jquery datepicker script * * If is not admin (backend) and the page is * woocommerce checkout add the field */