We face a common issue on many websites that whenever a form submits to the same page, and then we refresh the page, the form data is submitted again. Sometimes the browser asks for confirmation, sometimes it does not. It becomes really frustrating if it causes an operation to happen twice. To prevent this on…
Author: Abhineet Mittal
Prevent Memory Leak in WordPress
Recently I faced an issue of memory leak in one of my WordPress projects. I was running a function that was reading post meta and user metadata of thousands of objects. I thought reading data from MySQL is cheap in terms of processing power and memory, but it turned out it was causing my function…
Fix Indentation Issue in Visual Studio Code
Easily fix the tab size issue in Visual Studio Code by making this simple tweak in settings.
Correct Way to Manage Title Tags in WordPress
Correct way to add or modify title tags in WordPress using the latest theme support feature and the filter hook to dynamically modify it on the fly.
Resolved: Graphics Processor Not Detected in Photoshop
I installed a new version of Photoshop and, suddenly, it was chaos all around. Photoshop started getting crashed even if there was a small graphic-intensive operation and closed automatically without even giving me a chance to save my work. On restarting the application, it was throwing an error message that it disabled enhancements which use…
Why some recipients are not getting your emails?
If you are using email on your custom domain using some email service like Google Workplace or Zoho Mail, you have to do certain configurations to ensure that your emails reach the inboxes of their recipients. Missing emails can be disastrous for a business. The most important configurations are SPF and DKIM in your DNS,…
Decode a PHP encoded string url in Javascript
Sometimes you may face a problem when you have to decode a string with Javascript which was originally url encoded with PHP. This can be an API response or cookie set by PHP setcookie function. A simple way to do this is through decodeURIComponent function in Javascript. But it leaves the "+" signs in the string….
How to change Post Type in WordPress
Use these simple methods to easily change post type of single or multiple posts while working with multiple post types in WordPress.
How to view and modify WordPress rewrite rules
Sometimes a page load issue in your WordPress website has more to do with some random error rather than a bug in your code. In this case, it was rewrite rules cache.
How to replace Paragraph Break with Line Break in LibreOffice Writer
Replace Paragraph Break with Line Break in LibreOffice Writer with these simple steps.
Whitelist all sub-sites for wp_safe_redirect in WordPress Multisite
This article shows how to add all the domains/sub-domains of a WordPress multisite network to allow safe redirects through wp_safe_redirect function.
Make Javascript sequential with “async” and “await”
Javascript code can be easily made sequential with the help of two simple, yet very powerful keywords “async” and “await”.
Javascript: Loop over querySelectorAll without error
In Javascript, there are a lot of instances when you want to find multiple elements on a page to apply a common operation to all of them. Suppose you want to hide elements of a particular class present on your web page. To do this, first get an array of all such elements using querySelectorAll…
Where to add custom code in WordPress
Writing custom code for WordPress may be easy, but you should carefully add your code at the correct place to keep it clean and easily maintainable.
How to create a WordPress plugin
Easily create a simple WordPress plugin without any complex setup or need of FTP/SSH to your hosting server.
How to use PHP built-in web server
You can use the PHP built-in webserver to test your PHP code, without the need to set up complex WAMP or LAMP software on your desktop.
Enable Gzip compression in WordPress with htaccess
Gzip compression speeds up your Wordpress website by compressing the resources at the server level using simple .htaccess configuration in Apache server.
Correct file permissions for WordPress on Apache
Let us set up correct file permissions (chmod) for your Wordpress website to ensure the flawless functioning of your website and security from attacks.
Customize your link preview on Facebook
Facebook & Twitter support Open Graph Protocol to transforms your blog post into a rich social object, allowing you to decide the appearance of your post's link preview on their respective platforms.
JSON-LD: Add Structured Data to improve SEO
Add structured data JSON-LD to your blog or website for better search engine optimization (SEO). It helps Google to understand your content better and helps your website to get a better search ranking.