Created
December 2, 2011 18:39
-
-
Save billerickson/1424332 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Lifestyle Archive | |
* | |
* @package Liquor | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2011, Bill Erickson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* | |
*/ | |
/** | |
* Intro - Article Archive | |
* @author Bill Erickson | |
* | |
*/ | |
function be_article_archive_intro() { | |
echo '<h4>Featured Articles</h4>'; | |
echo '<div class="archive-intro lifestyle-intro">'; | |
be_sort_by(); | |
echo '<div class="filter-category"><label>Category:</label> '; | |
echo be_taxonomy_select_and_filter( 'lifestyle-type' ); | |
echo '</div><!-- .filter-category-->'; | |
be_navigation_count( 'Articles' ); | |
echo '</div>'; | |
} | |
add_action( 'genesis_before_loop', 'be_article_archive_intro', 15 ); | |
/** | |
* Post Info - Article Archive | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/genesis-post-info/ | |
* | |
* @param string original post info | |
* @return string modified post info | |
*/ | |
function be_article_archive_post_info( $info ) { | |
$info = '[post_date format=m.d.Y] [post_terms taxonomy="lifestyle-type" before=""]'; | |
return $info; | |
} | |
add_filter( 'genesis_post_info', 'be_article_archive_post_info' ); | |
/** | |
* Move Post Info | |
* @author Bill Erickson | |
* | |
*/ | |
function be_lifestyle_archive_move_post_info() { | |
remove_action( 'genesis_after_post_title', 'genesis_post_info' ); | |
add_action( 'genesis_before_post_title', 'genesis_post_info' ); | |
} | |
add_action( 'genesis_meta', 'be_lifestyle_archive_move_post_info', 15 ); | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment