Code Snippets by Gaurav Tiwari

Hand-built WordPress, PHP, CSS, JavaScript and dev-tool snippets from 16+ years of building for gauravtiwari.org and client sites. Every one tested on live sites.

GitHub · RSS 

    ‘snippet’, ‘posts_per_page’ => -1, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘ignore_sticky_posts’ => true ) ); $loop_count = 0; while ( $__q_54fcfc->have_posts() ) : $__q_54fcfc->the_post(); $loop_count++; ?>
  1. Updated on

FAQ

How do I use these Code Snippets?

Depending on the code snippet, the usage can differ. Please refer to the individual article/code snippet/plugin for detailed instructions on how to use these.

Do I need to credit you for the code?

No. You can use these codes in your projects, whether personal or commercial. But it would be very kind of you if you could provide credit. That will encourage me to work more and better.

‘This’ code snippet doesn’t work, what to do?

If something doesn’t work, you can report that to me at gaurav@gauravtiwari.org :) I’ll take a maximum of 12 hours to respond to your email.

How to save these code snippets for later?

You can bookmark the pages or save the URLs to getpocket.com — and visit back later. You can also follow me on Twitter to get regular code updates.