This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |