WordPress blog posts

Samsung galaxy buds – 92AC

The samsung galaxy buds were recently launched and while using I aquired the following files: Samsung galaxy buds manual – SM-R150 Samsung galaxy buds manual – dutch – 92AC Samsung galaxy buds manual – dutch – support pag Samsung galaxy buds manual – dutch – support pag


Function for bash_profile to test your websites

This is a simple, adjustable function you can put in your bash_profile to test if your websites give the right http status: function test { declare -a array=( “https://www.puddinq.com” “https://www.puddinq.nl” “https://puddinq.mobi” “https://www.winkel-centrum.nl” “https://lekker-kontje.nl” ) for i in “${array[@]}” do echo -ne “$i “; curl -Is “$i” | head -1 done } The rusult will be […]


Generate sourcemaps in twentynineteen for style.css

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 && […]


Compile sass in the new twentynineteen theme – WorPress 5.0

WordPress 5.0 is out! and it does not only come with Gutenberg but also with the new theme twentynineteen 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 […]


highlight search terms in search results

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’, […]


Warning: The type attribute is unnecessary for JavaScript resources.

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    



PHPStorm – remove div with class

In a search and replace project we had to remove one div from 1000+ static html pages. We knew the id (container) and class (nav) it had and the class of the div (class is fullWithBlock) that followed that specific div on every page (<div id=\’container\’ class=\’nav\’>[.\s\S]*?)(?=(<div class=’fullWidthBlock))


Output array() as html table with keys as colomn header

This function returns every array() as html table. function puddinq_display_table($result) { if (is_null($result)) { return; } ?> <table> <thead> <tr> <th><?php echo implode(‘</th><th>’, array_keys(current($result))); ?></th> </tr> </thead> <tbody> <?php foreach ($result as $row): array_map(‘htmlentities’, $row); ?> <tr> <td><?php echo implode(‘</td><td>’, $row); ?></td> </tr> <?php endforeach; ?> </tbody> </table> <?php }


Checkout: custom date field

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 */