Long awaited WordCamp Nepal 2015 successfully ended this last Saturday. I couldn’t attend the last WordCamp but I was not in a mood to miss this one. Attending WordCamp, representing ThemeGrill was surely a proud moment. ThemeGrill was the silver sponsor for the WordCamp. Me with my whole ThemeGrill team mates were there and we […]
WWW vs Non WWW URL
Well here’s the question whether to use WWW or non WWW url with your domain? Which is better? What’s the impact on SEO? I think it doesn’t matter. But what ever you choose stay with one. Either redirect your www domain to non www or non www to www domain. SEO Perspective From the perspective of SEO […]
Make WordPress Plugin compatible with Multisite
Recently, I have been working on a plugin and found out that a plugin working on a single blog doesn’t necessarily means it will work on your multisite environment too. Making your plugin compatible with WordPress multisite is not so hard. But when your plugin creates custom tables or site options on activation of the […]
Prevent direct access to Plugin file
Recently, I wrote my first plugin called First Comment Redirect. And before that I did a pretty much of research on how to write a secure plugin and there was a code snippet that I found in most of the plugins. The code was this if ( ! defined( ‘ABSPATH’ ) ) exit; So basically […]
First Comment Redirect
First Comment Redirect is a simple plugin that lets you to redirect commenter who just made their very first comment on your site to any pages or custom links you prefer. So what’s the point for redirecting commenter to any other page or link? Well you can redirect them to a simple Thank you page, […]
When to use pre_get_posts in WordPress
Many of us are unaware about pre_get_posts hook that is very handy when it comes to alter the main loop. I got to know about this handy filter via WordPress review team while submitting a theme to WordPress.org. So I will try to explain as simply as I could about its uses, benefits and when to […]
WordPress Custom Loop Pagination
Using WordPress normal loop to achieve something completely different is often not possible, So two things comes first. Either to use query_posts or wp_query. But its always better to use wp_query. There is almost nothing you cannot achieve using wp_query. But whenever Pagination comes in wp_query, its all messed up and even WordPress Codex do […]
Part II: Data Validation and Sanitization in WordPress
In the First Part of this article, I explained about Data Validation and Sanitization, it’s importance and some key differences between them. In this part I shall be covering some of the important functions in WordPress that can be used to validate and sanitize data. First, lets have a brief explanation on HTML elements and […]
Part I: Data Validation and Sanitization in WordPress
Data validation and sanitization comes into action whenever users are allowed to enter data either via forms in Custom Meta Box, Theme Options or any other ways. Although our code seems to work fine without the implementation of data validation and sanitization but it is important to validate the code if you want your data’s […]