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
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.
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
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