Add Custom Fields to Rest API
Query Posts by Custom Fields in WordPress
Query WordPress Posts by Advanced Custom Fields
Unset Shipping Methods if Free Shipping is Available
Unset all other shipping methods
Unset specific shipping method
Add fee to checkout for COD shipping except specific shipping zone
Display Breadcrumbs without Plugin in WordPress
Add custom class to WordPress excerpt
Archive with numbered pagination – loop posts
template-parts/content-archive.php
SASS
Add hreflang markup to head section of WordPress Multisite
Let’s set up hreflang language markup in HTML for all language versions
Add hreflang to the HTML of each page that you want to specify alternative versions. The tag should be added at the beginning of the head section after Title and Description.
Variable hreflang x-default
- If there is a language selection page, a line of code should be added to it with the hreflang attribute and a “default” value.
- The x-default value of the hreflang attribute tells you that this page has no specific language, regional settings or it is an IP-dependent page, in other words, it is the default page.
- If there is no specific language version for a user, the default page will be shown to him.
echo '<link rel="alternate" hreflang="x-default" href="https://YOURWEBSITE.com" />';
Conversion Tracking for WooCommerce
Google Ads Global tag
Event snippet for conversion page
Display Product Price with VAT in Single Product WooCommerce
WordPress asking for my FTP credentials to install plugins
sudo chown -R www-data:www-data PATH_TO_YOUR_WORDPRESS_FOLDER
Check if multiple categories is in the cart
Disable Specific Shipping Method based on Category
Check if specific category is in the cart
Disable Weekends and Previous Dates in DatePicker
Change Continue Shopping link to the Previously Visited Page in WooCommerce
This snippet changes the redirect URL for the Return To Shop button in the cart
Shorten the post title in WordPress
How to display Categories and Products in Separate Lists in WooCommerce
How to install the `ll` command on Mac OS X?
If You want to list directory contents in terminal, you need to type the following command:
ls -la
But it’s easier to simplify this command in MacOS:
alias ll='ls -lG'
Now just go ahead and type:
ll