Skip to content

Instantly share code, notes, and snippets.

@Roberto-Sudo
Roberto-Sudo / 0_reuse_code.js
Created July 25, 2014 23:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
To call the function I do something like this:
$cat = '2,6,3,4,12,11,17,16,125,1,13,9,7,15,49,51';
$posts = get_popular_posts_array( array( 'range' => 'all', 'limit' => 24, 'cat' => $cat, 'pid' => '2694,2696,2699' ) );
And then I do a foreach using the $posts array. This way I can even use it twice or as many times as I want without repeating the query.