Category Archive For "WordPress"
Code example: Custom WP-CLI Command and How it works
If you’re a developer managing WordPress sites, you might need to automate certain tasks or fetch information quickly using the command line, and that’s where WP-CLI commands come in handy. This particular command checks if the “Show featured image in the posts lists only but hide it in the single post view” option is enabled …
Overwrite the Affiliate Cookie in Ultimate Affiliate Pro
In Ultimate Affiliate Pro, when a user clicks on an affiliate link, a cookie (such as uap_referral) is set to track the affiliate. If the same user clicks on a different affiliate link later, you might want to overwrite the existing cookie to credit the new affiliate. Here’s how you can handle this scenario: Steps …
Automating WooCommerce: How to Auto-Draft Expired Event Products with a WordPress Cron Job
To automatically mark products as “draft” when the event date stored in the date post meta has passed, you can create a scheduled task (cron job) that runs regularly and checks if the event date has passed. If the date has passed, the product will be marked as a draft. Here’s a step-by-step solution: Step …
Excluding WooCommerce products from categories via the REST API
In short, this code helps exclude products from specific WooCommerce categories when using the REST API. It works by: This way, products from the specified categories won’t appear in REST API responses, improving customization and control over your WooCommerce store’s data.
How to Add WooCommerce Custom Field to a Product page
When you need to add required input field to the product page of your WooCommerce shop and this field needs to be stored in order as an attribute and sent to the customer in confirmation email, you’ll need to add custom code to your theme’s functions.php file. Here is the step-by-step process and the necessary …
Refresh Custom fragments in WooCommerce
WooCommerce excels in e-commerce functionality, including a handy feature called “fragments.” These fragments are pieces of HTML content that update dynamically on the front end without a full page refresh. They’re crucial for enhancing the user experience and maintaining a seamless feel throughout your online store. While WooCommerce offers excellent built-in fragment handling, there are …
How to use VS Code Server on SpinupWP
WordPress development can be a tedious and time-consuming process, often requiring frequent server-side interactions and configuration. To streamline this workflow, many developers turn to cloud-based solutions like SpinupWP, which offer quick and easy WordPress server provisioning and management. However, working remotely with a cloud-based server can still pose challenges, particularly when it comes to accessing …
How to Delete Theme in WordPress
You cannot delete an active theme. If you’re trying to delete the currently active theme on your site, you’ll need to activate a different theme first. Before deleting a theme, creating a backup of your site is a good idea, just in case something goes wrong.
WordPress Block Patterns
Fasten your seat belt 🙂 By the end of this article, you will be able to understand what is all about and how to build your first block pattern + one block pattern you will get for FREE.
6 Chrome Extensions for Web development
I share with you some of the Chrome extensions I use for cleaning the cache, Color Picker, HTTP/2 enabled and loading speed indicator, JSON formatter, and structured data testing tool.