How to change the default WordPress sender name and email address
To change the default sender name and email address, simply paste this code snippet into your (child-)theme’s functions.php.
Read moreTo change the default sender name and email address, simply paste this code snippet into your (child-)theme’s functions.php.
Read moreAdd this snippet to your (child-)themes functions.php to disable the search widget and redirect any search query to 404.
Read moreA simple code snippet for your (child-)themes functions.php to disable various feeds.
Read moreIn case you want to add some custom styles to the WP dashboard, you’ll have to enqueue a new css file in your (child-)themes functions.php: function add_admin_style() { wp_enqueue_style( ‘admin-style’, get_stylesheet_directory_uri() . ‘/css/admin-style.css’ ); } add_action(‘admin_enqueue_scripts’, ‘add_admin_style’);
Read moreFor whatever reason it can be useful to block specific email addresses from account registration in WooCommerce. To accomplish this you need an email blacklist. With only a few lines of code you can check if the entered email address is listed in your blacklist even before a user account is generated and echo an
Read moreAdding custom cols to the orders table can be very useful for shop managers and admins. If you use some kind of invoice or shipping plugin, you probably don’t want to click in each order to see if there is already a shipping label or an invoice created. So what you want to do is
Read moreWooCommerce recommends to automatically add a product to cart with a code snippet you can add to your (child-)themes functions.php: https://docs.woocommerce.com/document/automatically-add-product-to-cart-on-visit/ This code works fine and is probably everything most shop owners need. But there is a scenario where this code doesn’t work or at least isn’t a good solution. The code always adds the
Read moreBy default WooCommerce doesn’t come with an easy way to show a simple product list in the WordPress dashboard. Even though there is of course the product post type overview, there is only few information of each product you can see at first glance. If you want to see the stock or if a product
Read moreEven if you like the Storefront theme as much as I do, you probably don’t want to show everyone, that your WooCommerce store is based on that theme. So you can either simply remove the credit from the footer by adding this snippet to your (child-)themes functions.php: add_action( ‘init’, ‘tk_remove_storefront_footer_credit’, 10 ); function tk_remove_storefront_footer_credit ()
Read moreBy default WordPress excerpts are 55 characters long. If you want to make you excerpts longer or shorter, you can do this by adding this code snippet to your themes functions.php: add_filter(‘excerpt_length’, ‘tk_excerpt_length’); function tk_excerpt_length($length){ return 40; }
Read more