Filter Shortcode

How to execute shortcode in any string or custom field in WordPress

You can use WordPress filter the_content and apply it to any string or custom field data to display its HTML content as well as render or execute any shortcode in it. Here is a code snippet, where a string with some HTML content and a shortcode in it. The above code will not just display

URL / Rewrite Filter

How to make Gutenberg block editor work, when WordPress Address & Site Address are different domains

Recently, I worked on a project where the WordPress site needed to have one domain for Site Address(SITE URL) and another one for WordPress Address(HOME URL). Everything was working fine. Except, whenever we tried to publish a post in Gutenberg editor, we were getting an error saying “Updating failed. “. This is also the case when


How to Debug errors in WordPress

WordPress has excellent inbuilt features to help you debug. You can enable most of the features by making small changes in the wp-config.php file in WordPress and you can also use a few plugins listed below to easily debug not only PHP errors but also, database queries, HTTP calls blocks and many more. Step 1:

Errors JavaScript

How to fix “Bootstrap’s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3” error

If you see the JavaScript error that says, “uncaught error: bootstrap’s javascript requires jquery version 1.9.1 or higher, but lower than version 3“, that means you have bootstrap version 3.3 or lower on your website which uses an older version of jQuery. But your website has a newer version of jQuery (higher than version 3).


How to load multiple versions of jQuery in your website ( different version of jQuery for specific pages )

I had recently shared a detailed post on how to fix jQuery error in your website due to WordPress core update, which doesn’t load the jQuery migration script. And one of the visitors asked in the comment section, if they can load a different version of jQuery on different pages. I found this interesting and


How to add, remove or customize any link from My Account menu in woocommerce

When you install Woocommerce on your website, it will automatically create My Account page for you. If you visit the My Account Page, you will see a customer account related menu links in it. Check out the screenshot below : Why change the My Account menu? There are scenarios when you may not need some


How to properly set up a child theme and why

When you implement any theme in your WordPress website, you should always try to implement it with a child theme set up. There are many advantages to implementing a site with a child theme. Please go through the details below to understand more. What is a Child Theme & Why use it: A child theme

WordPress Security

Avoid File Manager plugin (critical security flaw)

File Manager plugin in WordPress is one of the most famous plugins with over 600,000 active installations. It allows users to browse, edit, and upload files and folders in your server that’s running WordPress. CAUTION: We strongly recommend that you never use any type of file manager plugin or WordPress’s inbuilt file editor. Vulnerability in


How to fix $.browser undefined error in WordPress with jQuery Migrate

$.browser function has been deprecated from the latest jQuery version. It had the flags $.browser.webkit, $.browser.safari, $.browser.opera, $.browser.msie and $.browser.mozilla to detect respective browsers in previous versions. But now, if your site has code with these flags and your theme has the latest version of jQuery, then it will throw an error message sayings “undefined”.


How to check if a user has a specific role or capability in WordPress

In many WordPress projects, you will need to check if a user has a specific role or capability. In this tutorial, I will provide custom functions to accomplish that. custom function to check if the user has a specific role : Once you have defined the above code in functions.php, you can check for a