top of page

Check if element exist in JavaScript or not

This would prevent unnecessary error on other pages of focus element not found. var elementExists = document.getElementById("closepopbtn"...

TO , CC , BCC in PHP mail()

Using mail() function to send mail with to , cc and bcc $to = 'nate@wpfixxyz.com'; $from = 'nate@yopmail.com'; $bcc =...

Writing Custom Scroll Bar CSS

Ever thought of a custom scroll bar with same theme as site color simple easy elegant Simple and Flat ::-webkit-scrollbar { width: 10px;...

Change the Slug of a Custom Post Type [CPT]

Its most required and desired functionality needed in word press when we create a custom post type and we need to change the slug...

Writing Media Queries in CSS

@media screen and (max-width: 1920px) { } @media screen and (max-width: 1680px) { } @media screen and (max-width: 1600px) { } @media...

Basic Website Optimisation through .htaccess

We can optimise the website speed by placing following code on the htaccess <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes...

Adding theme options with Advance Custom Fields Pro

Advance Custom Fields Pro allows you to create amazing option to create theme options you can start with basic structure by adding...

Creating a page template on WP

Creating a custom page template on word press is too easy with few lines of code and crate a new file as page-home.php and add following...

Defer Parsing of Java script in WP

This is generally useful in speed optimisations and can help a lot to reduce load time of pages specially when your site depend heavily...

Change slug of [Custom Taxonomy] on fronted

This is very curious code as you we end up creating taxonomies like "product-cat" or "product_cat" so following code come to rescue...

Add a Blank Select Option to CF7

You can add a blank option to contact form 7 select box using following and That appears in front end as below

Forcefully Load Changed JS and CSS

There are instance when client are not able to see changes that we are able to see because they are cached on browser and only way to fix...

Set/Get/Erase Cookies

These are three functions setCookie , getCookie, eraseCookie to deal with cookies on WP site like you want to hide a popup after user...

Disable Block Editor

You can disable block editor without external plugin by 2 lines of code in themes functions.php or create a folder as mu-plugins in...

© 2020 by syednazrulhassan

bottom of page