Skip to content

Instantly share code, notes, and snippets.

View jpmarchand's full-sized avatar

Jean-Philippe Marchand jpmarchand

View GitHub Profile
@robneu
robneu / genesis-cpt-entry-footer.php
Last active December 30, 2015 09:39
Add entry footer markup for custom post types in Genesis
<?php
/**
* Add support for the genesis entry-footer markup within custom post types.
*
* The default Genesis entry footer markup will only render for standard posts.
* this removes the default genesis markup and recreates it allowing for CPT
* usage in addition to standard posts. Pages are still ignored.
*
* @author FAT Media, LLC
@robneu
robneu / include-post-types-in-search.php
Last active December 29, 2015 01:39
Include all custom post types in front-end search results. Post types which have been set to be excluded from search will not be displayed.
<?php
add_action( 'pre_get_posts', 'prefix_include_cpts_in_search' );
/**
* Include custom post types in search results.
*
* Custom post types are not included in the default WordPress search
* functionality. This code will add them to all front-end searches.
*
* @author FAT Media, LLC
* @link http://youneedfat.com