Archives: Tutorials

Laravel .env access restriction using .htaccess

Open your .htaccess file Add the following script: <Files .env> Order allow,deny Deny from all </Files>  

Read more

Page Alternative Links for WordPress

Simple plugin to add alternative links to your existing pages. Sometimes if we want to change the page url, we don’t want to lose the url ranking in Google. This plugin will allowyou to change the page url and the alternative links (old link; depending on the scenario) on it. Features Unlimited alternative link to your existing page Canonical tag […]

Read more

Insert subscriber to MailChimp using PHP

MailChimp is a marketing automation platform and an email marketing service. If you’re familiar with this and you want to insert subscriber on your MailChimp list, you can use this function.

Read more

Replace content in WordPress output

This is how you can replace text in the content before showing it to the user.

Read more

Automatically add ALT attribute for all images using jQuery

A basic requirement of Search Engine Optimization or SEO is to add alternative (ALT) and title tags to the images but sometimes, we forget to add it. Using this script, it will automatically add ALT and title to the images.

Read more

Automatically add target blank attribute for all external links using jQuery

var comp = new RegExp(location.host); $(‘a’).each(function() { if (comp.test($(this).attr(‘href’))) { $(this).addClass(‘local’); $(this).attr(‘target’, ‘_self’); } else { var href = $(this).attr(‘href’); if (href.indexOf(‘mailto’) > -1) { //mailto console.log(“sdfsdf”); $(this).attr(‘target’,’_self’); }else{ $(this).addClass(‘external’); $(this).attr(‘target’,’_blank’); } } });

Read more