If you use mailchimp or a similar mailing list service, you’ll probably find this code. This code ensures that the featured image of each post is included in the RSS feed as a element, enhancing the feed with images. Like all hooks this code needs to be inserted into fucntions.php of your child theme. Or […]
WordPress & WooCommerce Hooks and Snippets: Customizing and Extending Functionality
In this section, we focus on enhancing your WordPress and WooCommerce sites using hooks and custom code snippets. Hooks allow you to modify or extend the functionality of your website without directly editing core files, making your site more flexible, efficient, and easier to maintain. This approach empowers you to tailor your website’s features according to specific business needs while maintaining compatibility with future updates.
Whether you're looking to improve your site’s speed, security, or functionality, the hooks and snippets shared here will help you customize WordPress and WooCommerce to meet your exact requirements. From simple tweaks to complex customizations, you'll find solutions that help you get the most out of your website.
How to Disable Payment Method When a Specific Product Category is Available – Woocommerce
Recently one of my clients asked me to make the following change to a website. For specific products, hide all payment methods except Wise Payments. But at the same time hide the Wise Payments payment method for all other products.To solve this problem, I added a “Limited” category and added additional code to functions.php. This […]
How to Display the Last Modified Date – Wordpress
Today I’m going to share with you a simple snippet for Wordpress that displays the date of last modified blog post. As always, you should add this snippet to the functions.php file of your child theme. Good luck!
How To Add a Badge To Selected Products – Woocommerce
Today let’s look at a simple snippet that hopefully will help someone:)Task: The client wanted to add badges to some products, depending on the season. First I created four new categories (winter, spring, summer, autumn) and then added the code to functions.php. And styling: /*seasonal badges*/.winter-badge, .spring-badge, .autumn-badge, .summer-badge {padding: 3px 4px;text-align: center;background: #FFFFFF;font-weight: bold;position: […]
How to disable font preload in Beaver Builder
I recently faced a small issue in Beaver Builder. Some fonts were loading but not being used. I found that the problem was with Beaver’s font preloading. With this simple hook, I disabled this feature. This code should be inserted into fucntions.php of your child theme. Hope this helps you too.