With this snippet, you can programmatically hide all notifications from the admin pages in wordpress. Many times, these notifications can become annoying, especially when they …
Snippets for your wordpress site
![](https://wpsnippet.club/wp-content/uploads/2023/05/wp-snippet-club.png)
Total number of monthly sales Woocommerce shortcode
This code defines a function total_sales_this_month() that calculates the total number of completed sales for the current month. It uses a custom query to count …
How to add Font Awesome (fa icons) to wordpress functions.php – without a plugin
Font Awesome is a great icon library widely used by developers and designers.By using the following snippet in your functions.php file , you can include …
Out of stock badge in shop page
with the snippet bellow, you can add a an out of stock badge in the product list
Include only in stock in Related Products
With this snippet, you will be able to filter the related products shown, so that you dont show out of stock products.
Add loading animation in add to cart button in Woocommerce
The code, adds a loading animation when the add to cart button is clicked. then ckecks if the button has been added to cart, if …
This code is a WordPress plugin (can also be added in the functions.php file) that creates a maintenance mode page when activated. No setup needed, …
Hide-Show menu items when user is Logged in / Logged out
In simple words, this code allows you to show or hide certain items in your WordPress site’s navigation menu based on whether the user is …
Create a coupon programatically in wordpress
This code creates a new coupon with a unique code, a specific amount, and discount type. The $coupon_code variable sets the code for the coupon, …