Category Archives: W3 Knowledge

How to write a superscript Registered ® in product name and page titles in CMS

Peoples are complaining that the products names or page titles which are registered trademarks. They are not shown superscript as the customer wishes them to be. They aren’t able to add <sup> tags in the titles.

You can simply add the following JavaScript snippet that replaces all occurrences of ® with ®.


<script type="text/javascript">
$('body :not(script)').contents().filter(function() {
   return this.nodeType === 3;
}).replaceWith(function() {
   return this.nodeValue.replace(/[®]/g, '<sup>$&</sup>');
});
</script>

How to setup AMP in WordPress

In this article I’ll show you that how to apply AMP in WordPress sites. It’s simple for a non-technical person. But if you are a Developer/Designer then this should be more easy to you.

Google is very strictly for page speed. Google wants that every websites should be super fast on DESKTOP and on MOBILE devices. And for this Google launched AMP (Accelerated Mobile Pages)

What is AMP?

AMP is an open source framework developed by Google in collaboration with Twitter. Accelerated Mobile Pages create better, faster experiences on the mobile web.

How to install AMP in WordPress?

There are many AMP plugins are available to install on a WordPress site. But there are only few that are works fine.
And after researching on these plugins I found that “AMP for WP – Accelerated Mobile Pages” is the best AMP plugin available on WordPress plugins directory.

Installing AMP in WordPress

This plugin has lots of advance features. In this you will get FREE themes and you can customize theme according to your website’s look and feel.

Apart from this you can get “Add-ons” which you can use for installing or integrating other third party tools or applications. You need to pay for these “Add-ons”.

AMP plugin features

You can download the AMP plugin form here.

Download Royalty Free Stock Images, Graphics, Illustrations, Music and Videos – Best Websites in 2019

Hello Folks,
Now a days people don’t want to pay for the stock images. All are looking for a FREE option.
https://unsplash.com/ and https://pixabay.com/ sites are very useful and provides royalty FREE images without charging a single coin.

There are many images are available for different categories or industries. You can simply go to the site and search anything in their directory.

Also you can search for the FREE Illustrations, Vectors and Videos.

How to Force Redirect HTTP to HTTPS in WordPress

This is the easiest way to redirect all HTTP URL’s to HTTPS.
Try this code. Just add it in .htaccess file at the root of your WordPress application.


   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php/$1 [L]
   RewriteCond %{HTTPS} off
   RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]