Dhanendran's Blog

It's all about my technology & social adventures…

Page 2 of 3

Uncaught Error: Call to a member function add_cap() in Multisite

The Issue: When creating a new site in WordPress Multi-site environment, I came across this issue fatal error. Fatal error: Uncaught Error: Call to a member function add_cap() on null in /srv/www/wordpress-default/public_html/wp-content/….XXXX…. While digging deep into it, I found that… Continue Reading →

Using get_template_part within Shortcode

The get_template_part is a one of the most useful function for the theme developers. It prints/includes the template content inside another template. It is used as an alternative to include or require. We can make use of this function within the… Continue Reading →

Hide PHP Warnings and Notices in WordPress

I recently came across some wired issue, were PHP warnings and notices are shown on the website even when we set WP_DEBUG to false in wp_config.php file. This happens mostly with the cheap shared hosts, were this settings won’t be respected and… Continue Reading →

WordPress $alloptions and $notoptions

$alloptions Whenever we are storing something on the WordPress options table via add_option() function, it stores the value in options table as well as cache. Yes, it stores it in 2 places. This is mainly for the quick retrieval or… Continue Reading →

Source code or syntax highlighting in WordPress.com

We have some limitations when we are hosting our blogs in WordPress.com with free plan.We can’t install many plugins to our blog, we can able to install only the limited plugins which is provided by the WordPress.com. As tech guy,… Continue Reading →

ERROR: The Google Authenticator code is incorrect or has expired

When we have 2 factor authentication enabled with Google Authenticator plugin in our WordPress site, we might face an awkward situation where WordPress login page keeps saying “ERROR: The Google Authenticator code is incorrect or has expired.“. I know you… Continue Reading →

Custom media button creation with wp.media

All most every WordPress users will use media in their posts, pages and comments. So media files playing a vital role in our WordPress world. WordPress will provide you an option to add media files in to your post by… Continue Reading →

Goodbye `get_terms`, Welcome `WP_Term_Query`

From WordPress 4.6, we have a new class called ​WP_Term_Query which will help us in querying the taxonomies easily. This class will give us more flexibility and ease of use like other classes like WP_Query,WP_User_Query, and WP_Comment_Query in WordPress. The main… Continue Reading →

Seed Balls: Plant the trees on the go

Recently, I came across a cool idea about planting trees while we travel or going for a morning walk or just stopping for a small break on the highway. Yes, it’s true. I am sure, I am not joking. Watch… Continue Reading →

WordPress REST API and OAuth 1.0a

WordPress REST API and OAuth is a perfect combination for many applications which runs WordPress as a backend. But for the beginners OAuth handshaking will be a bit complex one to understand. If you are is this category, don’t worry… Continue Reading →

« Older posts Newer posts »

© 2020 Dhanendran's Blog — Powered by WordPress

Theme by Anders NorenUp ↑