MySQL Query to Get a Random Post from WordPress Database

When you are creating a custom loop, generally query_posts or WP_Query is more than enough for the job. But if you want to work on an API project that depends on WordPress tables, then you will need to use custom MySQL queries. Here is a custom MySQL query to get a random post from the […]

Read more MySQL Query to Get a Random Post from WordPress Database

[How to] Display Number of Posts in WordPress

Using WordPress core function wp_count_posts, you can easily display total number of posts. Here is a simple example on how to use this function: <?php $count_posts = wp_count_posts(); $published_posts = $count_posts->publish; echo ‘We published ‘ . $published_posts . ‘ posts until now, and it’s still growing..’; ?> This displays a text output like this; We […]

Read more [How to] Display Number of Posts in WordPress

[How to] Install WordPress on Wamp

To develop themes and plugins for WordPress, a local working environment is best. You can easily create a local working environment on your Windows computer using WAMP. WAMP is a software package for installation of Apache+Mysql+PHP. It saves you time by combining multiple setups together. In this video tutorial we are showing you how to […]

Read more [How to] Install WordPress on Wamp