-
Add Google Analytics to WordPress website
Google Analytics allows you to get information about your websites visitors such as the devices or OS they were using and their location. Such information can be very useful for deciding how best to deliver content. Below, I’ll explain how to set up a Google Analytics on the WordPress website.
Continue reading → -
How to fix: Can’t use function return value in write context
After making an update to one of my WordPress plugins, when trying to load plugin settings page, I get the following error message:
Fatal error: Can’t use function return value in write context in /public_html/domain-name.com/wp-content/plugins/rss-feed-icon-for-specificfeedscom/inc/php/functional.php on line 19
Continue reading → -
Using constants in WordPress plugin
I’ve been writing WordPress plugins for a long time. At the top of the main plugin file, I usually define some constants. These constants contain basic information about my plugin, such as: Name of plugin, Path to plugin folder, Text domain name, and etc. Constants give me the opportunity to have easy and quick access to this information. And if I need to change any of this information, then I just change it once in constant instead of looking for every mention of this information in all plugin files.
Continue reading → -
How to fix: Jekyll build/serve error message
We can set up a local version of our Jekyll GitHub Pages website to preview our website before making the changes public. But when I run the
Continue reading →jekyll [build | serve]
command it throws the following error message: -
Detect ad blocker and show a message to visitor of website
For many websites that publish content for free, ads are one of the primary sources for getting revenue. This revenue is spent for paying the expenses to run the website. Reduction of the displayed ads means less revenue. If you’re finding that the majority of your website’s visitors are blocking ads then you might want to try displaying a friendly message asking them to disable the ad blocker extension that they have installed in web browser. In this article I’ll show you how I detect the ad blockers and show the message to visitors of my website.
Continue reading →