Skip to content

Instantly share code, notes, and snippets.

View ellefsen's full-sized avatar

Kim Ellefsen ellefsen

View GitHub Profile
<?php
/*
Plugin name: Single user login
Plugin URI:
Description:
Author: Ben May
Author URI:
Version: 0.1
*/
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
@ellefsen
ellefsen / gist:9618353
Created March 18, 2014 11:35
searchform.php with tax-term filter
<form role="search" method="get" id="searchform" action="<?php bloginfo('home'); ?>">
<input type="text" value="" name="s" id="s" />
<?php
function get_terms_dropdown($taxonomies, $args){
$myterms = get_terms($taxonomies, $args);
$selected = "selected";
$output ="<select><option selected='".$selected."'>Select a Category</option>'";
foreach($myterms as $term){
@ellefsen
ellefsen / gist:3215943
Created July 31, 2012 10:35 — forked from evansolomon/gist:2274120
nginx WordPress multisite config
server {
listen 80 default_server;
server_name domain.com *.domain.com;
root /srv/www/domain.com/public;
access_log /srv/www/domain.com/log/access.log;
error_log /srv/www/domain.com/log/error.log;
location / {
index index.php;