Skip to content

Instantly share code, notes, and snippets.

@tuanle259
tuanle259 / function.php
Created February 26, 2016 05:43 — forked from hlashbrooke/function.php
WordPress: Display posts in a random order, but retain persistent pagination
<?php
session_start();
add_filter( 'posts_orderby', 'randomise_with_pagination' );
function randomise_with_pagination( $orderby ) {
if( is_front_page() ) {
// Reset seed on load of initial archive page
@tuanle259
tuanle259 / fileupload.api.php
Created February 17, 2016 05:01 — forked from ericmulder/fileupload.api.php
Wordpress JSON API Controller for media upload
<?php
/**
* Plugin Name: JSON API - Media Controller
* Version: 0.0.1
* Author: Eric Mulder
* Author URI: https://emdevelopment.nl
* Plugin URI: https://emdevelopment.nl
* Description: Extensions to the JSON API plugin, to enable file upload
* Licence: GPLv2+
*/