Skip to content

Instantly share code, notes, and snippets.

Avatar

John Dugan johndugan

View GitHub Profile
@hissy
hissy / gist:3613306
Last active May 15, 2022
[WordPress] change next / previous post link ordering
View gist:3613306
<?php
/**
* Customize Adjacent Post Link Order
*/
function my_custom_adjacent_post_where($sql) {
if ( !is_main_query() || !is_singular() )
return $sql;
$the_post = get_post( get_the_ID() );
$patterns = array();
@elivz
elivz / wordpress-w3tc-site.conf
Created Mar 20, 2011
Nginx configuration for WordPress with W3 Total Cache plugin. See http://elivz.com/blog/single/wordpress_with_w3tc_on_nginx/
View wordpress-w3tc-site.conf
server {
# Redirect yoursite.com to www.yoursite.com
server_name yoursite.com;
rewrite ^(.*) http://www.yoursite.com$1 permanent;
}
server {
# Tell nginx to handle requests for the www.yoursite.com domain
server_name www.yoursite.com;