• Skip to main content
  • Skip to primary sidebar

WordPress, Genesis Framework and Storefront customization tutorials

  • Archive
    • Free
    • Premium
  • Blog
  • About
  • Contact
  • Newsletter
  • Login
Home » Free » Page 4

Free

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" />';

Filed Under: Free Tagged With: SEO

Conversion Tracking for WooCommerce

Google Ads Global tag

Event snippet for conversion page

Filed Under: Free Tagged With: Analytics

Display Product Price with VAT in Single Product WooCommerce

Filed Under: Free Tagged With: WooCommerce

WordPress asking for my FTP credentials to install plugins

sudo chown -R www-data:www-data PATH_TO_YOUR_WORDPRESS_FOLDER

Filed Under: Free

Check if multiple categories is in the cart

Filed Under: Free Tagged With: WooCommerce

Disable Specific Shipping Method based on Category

Filed Under: Free Tagged With: WooCommerce

Check if specific category is in the cart

Filed Under: Free Tagged With: WooCommerce

Disable Weekends and Previous Dates in DatePicker

Disable Weekends and Previous Dates

Filed Under: Free

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

Filed Under: Free Tagged With: WooCommerce

Shorten the post title in WordPress

Filed Under: Free

How to display Categories and Products in Separate Lists in WooCommerce

How to display Categories and Products in Separate Lists in WooCommerce

Filed Under: Free Tagged With: 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

Filed Under: Free

How to fix WP-CLI Error establishing database connection in LocalWP

Create file named info.php in your WordPress root folder with the following PHP function:

<?php phpinfo(); ?>

Check the http://yourdomain.com/info.php details and search for pdo_mysql.default_socket. Here You will find the value that You need>

Change your DB_HOST value in the wp-config.php file from localhost to

/** MySQL hostname */
define( 'DB_HOST', 'localhost:/Users/YOUR_MACOS_USERNAME/Library/Application Support/Local/run/VALUE_FROM_PHP_INI/mysql/mysqld.sock'

YOUR_MACOS_USERNAME – whatever your username that you log into your computer with.
VALUE_FROM_PHP_INI – Click the (i) icon next to the version of PHP in Local. Once the php info page loads in your browser, search the page for “Loaded Configuration File”. You should see something like /Users/xxx/Library/Application Support/Local/run/JVTSp1q91/conf/php/php.ini. Grab the random set of characters between “run/” and “/conf”. In my example, JVTSp1q91.

Filed Under: Free

Compile SASS and build JS with Webpack

If You’ve tried SASS before You don’t want to write a single line of CSS anymore. Webpack is an awesome tool that builds and minify the JavaScipt and CSS files.

How to use Webpack with SASS Loader?

Open the terminal at the project folder

Step 1 – Initialize package.json

npm init -y

Step 2 – Install the following packages:

  • Webpack
  • Webpack-CLI
  • Sass Loader
  • Node Sass
npm install --save-dev webpack webpack-cli sass-loader node-sass

Your package.json going to be look like this

It is going to be generated, so You don’t need to copy the content.

Step 3 – Create a file named webpack.config.js

Step 4 – Run webpack and watch for changes

npx webpack --watch

Filed Under: Free Tagged With: Webpack

Webpack basic config

webpack.config.js

Filed Under: Free

Display WooCommerce Product Category Subtitle

Filed Under: Free Tagged With: WooCommerce

How to add Google Maps API Key to WordPress

Let’s go to the Google Cloud Platform

You have to add credit or debit card to use the Google Maps platform.

Create a new project

Enable APIs and Services

Search for these 3 APIs

  • Maps JavaScript API
  • Places API
  • Geocoding API

Create the credentials

  • Application restrictions must be HTTP referrers (web sites)
  • Website restrictions is your website url
  • API restrictions – select the above mentioned 3 API

and in the end just add the following snippet to your functions.php with your API key:

Filed Under: Free

Install WordPress Plugins with Composer from Command Line

Create a file named composer.json in your theme folder. Copy and paste the following json snippet.

Open the terminal in the theme folder and type:

composer update

WordPress Packagist

Filed Under: Free

Remove product content based on category

Filed Under: Free Tagged With: WooCommerce

Get Current Shipping Method WooCommerce

Filed Under: Free Tagged With: WooCommerce

  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Interim pages omitted …
  • Page 19
  • Go to Next Page »

Primary Sidebar

Gabor Flamich

Hi! I'm Gabor.
I write tutorials on WordPress and WooCommerce.

MacBook

12 Essential Snippets for Genesis Developers

Subscribe to my Newsletter to view my basic collection of Genesis snippets that I use for my projects!

Sign Up for Free
  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube
UpdraftPlus Premium

Tags

ACF Ajax Analytics API Bootstrap Breadcrumb category CPT CSS fetch FSE Genesis Google Maps Gutenberg HTML Isotope JavaScript jQuery loop Map Menu Parallax PHP Rest API SASS SEO SQL Storefront SVG tab tag manager tags Taxonomy Tool upsell Webpack Wholesale WooCommerce WordPress WPML

Disclosure: Some of the links in this site are affiliate links. I will be paid a commission if you use this link to make a purchase.

  • Privacy Policy / Terms of Service
© 2025 WP Flames - All Right Reserved