Skip to content

Instantly share code, notes, and snippets.

View cjmox's full-sized avatar

Calvin Morris cjmox

View GitHub Profile
@cjmox
cjmox / Related posts
Created February 20, 2014 21:33
WordPress: Related Posts based on category of current post
@cjmox
cjmox / sf_pagination
Created February 28, 2014 22:23
Custom WordPress Pagination
// Modified code from http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/
// Could be a lot cooler if someone wants to write a way to add in an ellipsis
// after a range of pages has been displayed,
// similar to how wp_paginate_links works
function sf_pagination($pages = '', $range = 4) {
$showitems = ($range * 2)+1;
global $paged;
if(empty($paged)) $paged = 1;

Keybase proof

I hereby claim:

  • I am cjmox on github.
  • I am cjmox (https://keybase.io/cjmox) on keybase.
  • I have a public key whose fingerprint is F30B 6446 AB7F 3850 129E 372C DEA3 1A8A 3D51 09C6

To claim this, I am signing this object: