WordPress: HTML & CSS & JavaScript

On this page, I will share helpful tips about WordPress, HTML, CSS, and javascript.

Follow me on Twitter for more tips.

CSS Tips

Sticky header and anchor links

Use the “scroll-margin-top” property to prevent a sticky header to cover up content after clicking on an anchor.

:target { scroll-margin-top: 1.5rem;}

Smooth Scrolling

Smooth scrolling without JavaScript, with just one line of CSS.

html { scroll-behavior: smooth; }

WordPress Plugins

Yoast SEO

https://yoast.com/

With the free version, you can change the world.

Site Kit by Google

https://sitekit.withgoogle.com/

Google’s official WordPress plugin. Connect your WordPress site with Webmaster, Analytics, and AdSense.

WordPress Themes

Twenty Seventeen by wordpress.org

Astra By Brainstorm Force

Open Source Genesis Framework

The Genesis Framework empowers you to quickly and easily build incredible websites with WordPress.

HTML Tips

Email, call, and SMS links:

<a href="mailto:{email}?subject={subject}&body={content}"> Send us an email</a><a href="tel:{phone}"> Call us</a><a href="sms:{phone}?body={content}"> Send us a message</a> 

WhatsApp Click To Chat (Message)

Use https://wa.me/ where the is a full phone number in international format. Omit any zeroes, brackets, or dashes when adding the phone number in international format.

Examples:

Use: https://wa.me/1XXXXXXXXXX

Don’t use: https://wa.me/+001-(XXX)XXXXXXX

<a href="https://wa.me/1XXXXXXXXXX">Text Me</a>

More resources about WhatsApp.