Notice: unserialize(): Error at offset
I was developing functionality in RecipePress WordPress theme of ours being sold on ThemeForest where I needed to save some recipes in cookies for users who are not logged in to the site. I came across this error where...
Notice: Object of class WP_Post could not be converted to int in /app/public/wp-includes/general-template.php
I faced this error while working on a project and it wasted some of my time to figure out why it was happening. I had the following code. It gave me the following error and it was not clear about its location which makes it a bit...
Redirect user on plugin activation
Sometime, it is necessary to redirect users to an introduction or to a necessary options page on plugin activation. Here I am sharing a quick way to do that. There are recommendations to do so directly on plugin activation which...
Quick Fix for Uncaught Error: Call to undefined function is_plugin_active()
In the WordPress development process, sometime you need to check if a certain plugin is active so that you can perform your task accordingly. The is_plugin_active() is the function available for that. In some cases, you face an...
Get current page url in WordPress
Getting current page URL in WordPress isn’t that easy for starters. Most of the people use $_SERVER variable to get URL. I tried following one to get current URL to redirect it after login or logout. $current_page_url =...