Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active July 22, 2019 21:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save billerickson/333e6393c86bc2a035de10e146eed180 to your computer and use it in GitHub Desktop.
Save billerickson/333e6393c86bc2a035de10e146eed180 to your computer and use it in GitHub Desktop.
<?php
/**
* EA Genesis Child.
*
* @package EAGenesisChild
* @since 1.0.0
* @copyright Copyright (c) 2014, Contributors to EA Genesis Child project
* @license GPL-2.0+
*/
/* Template Name: Recipe Listing */
/**
* Recipe Listing
*
*/
function ea_recipe_listing() {
echo facetwp_display( 'template', 'recipes' );
echo facetwp_display( 'pager' );
}
add_action( 'genesis_loop', 'ea_recipe_listing' );
remove_action( 'genesis_loop', 'genesis_do_loop' );
/**
* Recipe Listing Sidebar
*
*/
function ea_recipe_listing_sidebar() {
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
if( function_exists( 'ss_do_sidebar' ) )
remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
echo '<h5>Healthy</h5>';
echo facetwp_display( 'facet', 'healthy' );
echo '<h5>Breakfast</h5>';
echo facetwp_display( 'facet', 'breakfast' );
echo '<h5>Lunch</h5>';
echo facetwp_display( 'facet', 'lunch' );
echo '<h5>Dinner</h5>';
echo facetwp_display( 'facet', 'dinner' );
echo '<h5>Dessert</h5>';
echo facetwp_display( 'facet', 'dessert' );
}
add_action( 'genesis_sidebar', 'ea_recipe_listing_sidebar', 5 );
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment