Skip to content

Instantly share code, notes, and snippets.

I created a rewrite endpoint called 'filter' which I'm going to use to toggle between
the standard blog post view (most recent posts), and most comments view (/filter/comments)
The code is really simple: https://gist.github.com/1285290
And it works great for the main blog page:
http://localhost:8888/dev-bachis/blog/ displays all posts in order of post date
http://localhost:8888/dev-bachis/blog/filter/comments displays all posts in
order of most comments
@billerickson
billerickson / gist:1289597
Created October 15, 2011 13:55
Interstrategy Events Manager - Displaying post info
<?php
/**
* Post Info
* Displayed below the post title on the single and archive view
* @author Bill Erickson
* @link http://wordpress.org/support/topic/plugin-interstrategy-events-manager-documentation?replies=4
*
* @param string, original post info
* @return string, modified post info
@billerickson
billerickson / gist:1289603
Created October 15, 2011 14:02
Interstrategy Events Manager - Same template for taxonomy
<?php
/**
* Template Redirect
* Use archive-event.php for all events and 'event-category' taxonomy archives.
* @author Bill Erickson
* @link http://www.billerickson.net/code/use-same-template-for-taxonomy-and-cpt-archive/
*
* @param string, default template path
* @return string, modified template path
@billerickson
billerickson / gist:1289628
Created October 15, 2011 14:16
Interstrategy Events Manager - Custom Event Information
<?php
/**
* Custom Event Information
* If you want to collect different information on the events, you'll need
* to define your own metabox with its fields, and then disable the default metabox.
* More documentation on making metaboxes at the link below.
* @author Bill Erickson
* @link https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress
* @link http://wordpress.org/support/topic/plugin-interstrategy-events-manager-documentation
@billerickson
billerickson / gist:1298344
Created October 19, 2011 13:56
Full Content in Display Posts Shortcode plugin
<?php
/**
* Full Content in Display Posts Shortcode plugin
* @author Bill Erickson
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/
*
* @param string $output the original markup for an individual post
* @param array $atts all the attributes passed to the shortcode
* @param string $image the image part of the output
* @param string $title the title part of the output
@billerickson
billerickson / gist:1303939
Created October 21, 2011 14:04
Modify Date Format in Display Posts Shortcode plugin
<?php
/**
* Modify Date Format in Display Posts Shortcode plugin
* @author Bill Erickson
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/
* @link http://wordpress.org/support/topic/plugin-display-posts-shortcode-show-date-in-format-dmy
*
* @param $output string, the original markup for an individual post
* @param $atts array, all the attributes passed to the shortcode
* @param $image string, the image part of the output
@billerickson
billerickson / gist:1307387
Created October 23, 2011 13:57
Taxonomy Listing
<?php
/**
* Template Name: Taxonomy Listing
*
* @package BE Genesis Child
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
*/
@billerickson
billerickson / gist:1313677
Created October 25, 2011 18:06
Adding additional fields to Display Posts Shortcode
<?php
/**
* Adding additional fields to Display Posts Shortcode
* This adds the field 'linkedtitle', and if false the title isn't linked
* @author Bill Erickson
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/
*
* @param string $output the original markup for an individual post
* @param array $atts all the attributes passed to the shortcode
@billerickson
billerickson / gist:1320990
Created October 27, 2011 21:53
Limit Gallery Metabox to Amenities Page Template
<?php
/**
* Limit Gallery Metabox to Amenities Page Template
* @author Bill Erickson
* @link http://www.wordpress.org/extend/plugins/gallery-metabox
* @since 1.0
*
* @param bool display metabox
* @param string post ID
@billerickson
billerickson / gist:1321001
Created October 27, 2011 21:56
Only show images marked as Include in Rotator
<?php
add_filter( 'be_gallery_metabox_args', 'be_gallery_custom_args' );
/**
* Only show images marked as Include in Rotator
* @author Bill Erickson
* @link http://www.wordpress.org/extend/plugins/gallery-metabox
* @since 1.0
*
* @param array query $args