Back to Top

URL to Post ID for Custom Post Types


In WordPress, url_to_postid is a magic function that helps you convert certain URLs to IDs. However, it is limited to built-in post types. This tip will show you how to quickly make url_to_postid work with WordPress custom post types.... more

Create Fake Pages in WordPress

Create Fake Pages in WordPress

People's need is changing everyday, and so is WordPress. From a simple blogging software, WordPress has evolved into a somewhat feature-rich Content Management System. It is, therefore, not a surprise if we, users and developers, always try to do crazy things with WordPress these days, and creating virtual (fake) WordPress pages is simply one of those unusual objectives.

So, what do we need fake pages for anyway? What I find particularly useful about... more

Using Global Variables in WordPress

Using Global Variables in WordPress

A global variable, as it name suggests, is simply a type of variable that is available for use within any fraction of your codes. PHP's global variables and all their glory can be used within WordPress to help you eliminate code duplication, and in some situations save you some database queries.

Even though many developers think that using global variable is simply a bad practice, if you use it the right way there... more

Page 1 of 1 1