Skip to content

Easy Wordpress Code

Wordpress HOW TO's, Snippets & Life Savers

  • WordPress
  • WooCommerce
  • Life Savers for WordPress
  • PHP
  • CSS
  • Hire Me

Syterr.com – Monitor Website Performance, Content Changes, Domain and more!

Posted on April 6, 2022April 8, 2022 by Mr Admin

Syterr.com – Monitor Website Performance, Content Changes, Domain and much more!

Continue reading
Speed Optimization, Wordpress
Leave a comment

Automatically Add ALT+TITLE to Images in the_content() output

Posted on March 21, 2022March 21, 2022 by Mr Admin

This will automatically assign the ALT & TITLE attributes to <img> elements that miss those. The value will be the

Continue reading
Life Savers for WordPress, PHP, Wordpress
Leave a comment

Add Multiple Required Checkbox Fields In WooCommerce Checkout Page

Posted on October 20, 2020October 20, 2020 by Mr Admin

Following the Add A Required Checkbox Field In WooCommerce Checkout Page, this is the guide to adding multiple required checkboxes

Continue reading
WooCommerce
Leave a comment

Totally Remove HREF Attribute From WordPress Menu Link Item

Posted on October 14, 2020October 14, 2020 by Mr Admin

If you need to insert a parent link item in your menu with no link and your only solution is

Continue reading
Wordpress
Leave a comment

WordPress: Add Rel Prev Next Meta Tags For Custom Query Loop

Posted on July 7, 2020July 7, 2020 by Mr Admin

When we use custom query loop in wordpress, we lose SEO befenits such as the rel prev/next meta tags that’s

Continue reading
Wordpress
Leave a comment

Contact Form 7: Add Country By IP Shortcode To Email

Posted on April 28, 2020April 29, 2020 by Mr Admin

Copy this code to your theme’s functions.php and use [country_by_ip] shortcode/tag ANYWHERE to print the visitor’s country by his IP

Continue reading
Life Savers for WordPress, Wordpress
3 comments

3rd Party Integration: Add Geolocation To Service Posts

Posted on April 28, 2020April 29, 2020 by Mr Admin

Copy this code to your theme’s functions.php and each call your ‘3rd party integrations’ plugin will make after a visitor

Continue reading
Life Savers for WordPress, WooCommerce
Leave a comment

Contact Form 7: Overwrite/Manipulate Posted Data Before Sending Email

Posted on April 28, 2020April 8, 2022 by Mr Admin

Copy this code to your theme’s functions.php to manipulate the posted data by the visitor, update, add or remove fields

Continue reading
Wordpress
Leave a comment

How To Add Checkbox To Checkout in WooCommerce

Posted on February 7, 2020May 6, 2021 by Mr Admin

This is how you add a checkbox to checkout in Woocommerce. The Checkbox will appear in the checkout is not

Continue reading
WooCommerce
2 comments

WPML: Fix Duplicate Hreflang Tags

Posted on January 27, 2020April 29, 2020 by Mr Admin

Paste this into your theme’s functions.php file to prevent from Hreflang tags to appear on the same current language and

Continue reading
Wordpress
Leave a comment

WooCommerce: Hide Tabs On Single Product Page

Posted on January 24, 2020April 29, 2020 by Mr Admin

Add this to your theme’s function.php to hide all product tabs on a single product page:

Continue reading
WooCommerce, Wordpress
Leave a comment

WooCommerce: Show Contact Form When Product Is Out Of Stock

Posted on January 24, 2020April 29, 2020 by Mr Admin

Paste those into your theme’s functions.php and edit the contact form shortcode inside do_shortcode function.

Continue reading
WooCommerce, Wordpress
Leave a comment

Add NoFollow (rel=”nofollow”) To WordPress Tags Cloud

Posted on October 28, 2019April 29, 2020 by Mr Admin

This is how you add rel=”nofollow” to tag links in the tag cloud using wp_tag_cloud(). Add it to your theme’s

Continue reading
WooCommerce
One comment

Remove HREF attribute from Empty Anchor Link on WordPress Menu

Posted on October 1, 2019April 29, 2020 by Mr Admin

Add the following code to your theme’s functions.php file to remove the HREF attribute from all the links that link

Continue reading
Life Savers for WordPress, WooCommerce
Leave a comment

Load Font-Awsesome Non-render blocking

Posted on June 16, 2019April 29, 2020 by Mr Admin
Continue reading
Speed Optimization
Leave a comment

Solved: Eliminate Render Blocking Fonts, Javascript & CSS in Google Lighthouse Speed Test

Posted on June 16, 2019June 8, 2020 by Mr Admin

Here’s the solution for eliminate render blocking fonts, javascript and css and load non-render blocking resources warning in Google Lighthouse

Continue reading
Life Savers for WordPress, Speed Optimization
Leave a comment

Add a Required Checkbox Field In WooCommerce Checkout Page

Posted on June 4, 2019April 8, 2022 by Mr Admin

This is how you add a checkbox to checkout in Woocommerce. The Checkbox will appear in the checkout and will

Continue reading
Life Savers for WordPress, WooCommerce
8 comments

Integrate HasOffers (By Tune) With WooCommerce

Posted on June 4, 2019October 15, 2020 by Mr Admin

In this post I will include my code to track, store and pass HasOffers (affiliate id + transaction id +

Continue reading
WooCommerce
8 comments

WooCommerce: Don’t Add Product To Cart If Already Exists

Posted on June 4, 2019April 29, 2020 by Mr Admin

Put it in your theme’s functions.php. Whenever your visiot will try to add a product twice mistakenly, it will keep

Continue reading
Life Savers for WordPress, WooCommerce
7 comments

Prevent Contact Form 7 (CF7) From Sending Email

Posted on June 4, 2019April 29, 2020 by Mr Admin

Put it in your theme’s functions.php and update the form id (999999) to your CF7’s form ID.

Continue reading
WooCommerce
Leave a comment

Disable Auto Check of “Ship to different address” Checkbox on Checkout

Posted on June 4, 2019April 29, 2020 by Mr Admin

Put it into your theme’s functions.php:

Continue reading
WooCommerce
Leave a comment

WooCommerce: Hide Coupon On Checkout If Already Exists

Posted on June 4, 2019April 29, 2020 by Mr Admin

This code will disable coupon on cart if it’s already applied.

Continue reading
Life Savers for WordPress, WooCommerce
Leave a comment

Search WordPress Posts By Custom Term Name (Category/Tag/Any Taxonomy)

Posted on June 4, 2019April 29, 2020 by Mr Admin

Copy this code to your theme’s functions.php and it will return posts in search result also by their category/tag name.

Continue reading
Wordpress
Leave a comment

Add Post Featured Thumbnail To Post List on WordPress

Posted on November 10, 2018April 29, 2020 by Mr Admin

Adding a featured image for each post is important for your website’s beauty & very much for the SEO part.

Continue reading
Wordpress
One comment

Disable A HREF Link With CSS ONLY!

Posted on November 10, 2018April 29, 2020 by Mr Admin

Disabling a link can be sometimes a dirty task to do. Sometimes we need to do that only temporarily and

Continue reading
CSS
Leave a comment

Add Facebook/Analytics/GTM Pixels To Your Website With No Plugins!

Posted on November 10, 2018April 29, 2020 by Mr Admin

There are many plugins that will let you add Facebook, Google Analytics, Google Tag Manager or any other data collector

Continue reading
Wordpress
Leave a comment

Integrate With MailChimp API With This Simple PHP Code

Posted on November 10, 2018April 29, 2020 by Mr Admin

Integrating your website with MailChimp is easily done with this code. You can connect it with any form that’s processed

Continue reading
PHP
Leave a comment

Change Category/Taxonomy Archive Page Title

Posted on November 10, 2018April 29, 2020 by Mr Admin

Customizing the archive/category page can be very useful if you want to take your website one step further by fine

Continue reading
Wordpress
Leave a comment

Add Your Custom Logo to WordPress Admin Login Screen

Posted on November 10, 2018April 29, 2020 by Mr Admin

Changing the WordPress logo in the login screen is pretty cool when you build a website to another client. Placing

Continue reading
Wordpress
Leave a comment

Disable WordPress Admin Black Bar

Posted on November 8, 2018April 29, 2020 by Mr Admin

Disabling Admin Bar can be done in 2 methods: Method #1: Update specific user profile And then uncheck the “Show

Continue reading
Wordpress
Leave a comment

Remove ?Ver Querystring Parameter From Static Resources with WordPress

Posted on November 8, 2018April 8, 2022 by Mr Admin

The following code example will remove all “?ver=” querystring parameters from static resources such as JS or CSS files, and

Continue reading
Speed Optimization, Wordpress
Leave a comment

Change Any Button, Input & Text With 1 Function (Also For WooCommerce)

Posted on November 8, 2018April 29, 2020 by Mr Admin

How many times did you encounter a “Add to Cart” button or “View Cart” button on your WooCommerce website and

Continue reading
WooCommerce, Wordpress
Leave a comment

WordPress Error Log 3 Code Lines Alternative with PHP

Posted on November 8, 2018April 29, 2020 by Mr Admin

Debugging WordPress error can be sometimes a tough mission. For that, we can use that simple code to create error

Continue reading
Life Savers for WordPress, PHP, Wordpress
Leave a comment

How To Add/Edit/Remove Custom Posts Columns In Posts Screen

Posted on November 7, 2018April 29, 2020 by Mr Admin

This snippet is one of the most useful I’ve ever used. It allows you to fully customize the shown columns

Continue reading
Wordpress
Leave a comment

How To Get The Real Visitor’s IP With PHP

Posted on November 6, 2018April 29, 2020 by Mr Admin

The following function will return the visitor’s IP address: Usage:

Continue reading
PHP
Leave a comment

Change WordPress Website URL (from wp-config.php)

Posted on November 5, 2018April 29, 2020 by Mr Admin

Sometimes you need to change your website’s url to a new url, it could be for many reasons but we

Continue reading
Wordpress
Leave a comment

Recent Posts

  • Syterr.com – Monitor Website Performance, Content Changes, Domain and more! April 6, 2022
  • Automatically Add ALT+TITLE to Images in the_content() output March 21, 2022
  • Add Multiple Required Checkbox Fields In WooCommerce Checkout Page October 20, 2020
  • Totally Remove HREF Attribute From WordPress Menu Link Item October 14, 2020
  • WordPress: Add Rel Prev Next Meta Tags For Custom Query Loop July 7, 2020

Top Rated Snippets

5 (1)

Automatically Add ALT+TITLE to Images in the_content() output

5 (1)

WooCommerce: Don’t Add Product To Cart If Already Exists

5 (4)

WordPress Error Log 3 Code Lines Alternative with PHP

5 (1)

Change Any Button, Input & Text With 1 Function (Also For WooCommerce)

5 (2)

Integrate With MailChimp API With This Simple PHP Code

Recent Posts

  • Syterr.com – Monitor Website Performance, Content Changes, Domain and more!
  • Automatically Add ALT+TITLE to Images in the_content() output
  • Add Multiple Required Checkbox Fields In WooCommerce Checkout Page
  • Totally Remove HREF Attribute From WordPress Menu Link Item
  • WordPress: Add Rel Prev Next Meta Tags For Custom Query Loop
  • Syterr.com – Monitor Website Performance, Content Changes, Domain and more!
  • Automatically Add ALT+TITLE to Images in the_content() output
  • Add Multiple Required Checkbox Fields In WooCommerce Checkout Page
  • Totally Remove HREF Attribute From WordPress Menu Link Item

WordPress Theme: Donovan by ThemeZee.