Enable debug for logging errors
WordPress has the option to write any errors to the debug.log file. Be careful with this and don't enable all debug features as you may accidentally show the errors on the website and you don't want that. To enable the debug option, the best option is to insert the...
Shortcode for automatic display current year
In the footer of a website you often want to mention a year for copyright, etc. In the footer you can only state this as text and you will have to update it manually every year. Fortunately, it is possible to overcome this by making a so-called shortcode yourself...
Divi: make a button full width in container
Some may have noticed, but the properties of a DIvi button module lack the option to set the size that can be set in many other modules. With a bit of CSS this is also possible for a button and you can make it as wide as the container (column) it is in. Open the...
Stop auto-delete tags
For example, when you add an extra line in the editor by means of an enter, WordPress sometimes wants to remove it again as soon as you save a page or post. You can prevent this automatic removal by adding the code below to the functions.php of the active theme,...
Different sorting per category in WooCommerce
By default in WooCommerce you can only set how you want to see the sorting of products in the shop. The sorting then applies to all products regardless of the category. Now it may happen that you want a different sorting for a certain category. With the code...
Add icons to menu items
This video from Green Tree Media explains how you can add an icon via FontAwesome to, for example, a menu item. All you have to do is assign a CSS class to the menu item and then add a few lines of CSS code to the stylesheet via the editor....
Enable trash feature for media
By default, media files that you delete in the media browser are permanently deleted. However, WordPress has a trash can feature that is disabled by default. Fortunately, this can be switched on. To enable this feature, you must add the code below to the...