This file contains hidden or 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 // Get rid of this tag | |
//* Register widget areas | |
genesis_register_sidebar( array( | |
'id' => 'after-entry', | |
'name' => __( 'After Entry', 'theme-prefix' ), | |
'description' => __( 'This is the after entry section.', 'theme-prefix' ), | |
) ); | |
//* Hooks after-entry widget area to single posts |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Add multiple grid loops to a page template*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop | |
function custom_do_grid_loop() { | |
$args = array( |
This file contains hidden or 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
// add featured image to single posts | |
add_action ( 'genesis_entry_header', 'pbh_featured_image_title_singular' ); | |
function pbh_featured_image_title_singular() { | |
if ( !is_singular() || !has_post_thumbnail() ) | |
return; | |
echo '<div class="singular-thumbnail">'; | |
genesis_image( array( 'size' => 'medium' ) ); |
This file contains hidden or 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
//* Remove page title form home page | |
add_action( 'get_header', 'child_remove_titles' ); | |
function child_remove_titles() { | |
if ( is_front_page() ){ | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
} | |
} |
This file contains hidden or 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 // Get rid of this tag | |
// Remove Post Info and Post Meta from Custom Post Types | |
function pbh_remove_post_info() { | |
if ( in_array(get_post_type(), array ('testimonial', 'project'))) { | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
} | |
} | |
add_action ( 'get_header', 'pbh_remove_post_info' ); |
This file contains hidden or 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 // Get rid of this tag | |
// Remove Post Info, Post Meta from CPT | |
function pbh_remove_post_info() { | |
if( 'testimonial' == get_post_type() ) { | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
} | |
} |
This file contains hidden or 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 // get rid of this tag | |
// Filter the request to just give posts for the given taxonomy, if applicable. | |
function taxonomy_filter_restrict_manage_posts() { | |
global $typenow; | |
$post_types = get_post_types( array( '_builtin' => false ) ); | |
if ( in_array( $typenow, $post_types ) ) { | |
$filters = get_object_taxonomies( $typenow ); |
This file contains hidden or 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 | |
// Note: Add only code below to your functions.php | |
// Add custom post types - cpt1 and cpt2 to main RSS feed. | |
function mycustomfeed_cpt_feed( $query ) { | |
if ( $query->is_feed() ) | |
$query->set( 'post_type', array( 'post', 'cpt1', 'cpt2' ) ); | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'mycustomfeed_cpt_feed' ); |
This file contains hidden or 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
*|RSSITEMS:|* | |
<h2 class="mc-toc-title"><a href="*|RSSITEM:URL|*" target="_blank">*|RSSITEM:TITLE|*</a></h2> | |
<br /> | |
*|RSSITEM:CONTENT_FULL|*<br /> | |
<a href="*|RSSITEM:URL|*" target="_blank">Read in browser »</a><br /> | |
*|RSSITEM:SHARE:Facebook,Twitter|* *|RSSITEM:PLUSONE|*<br /> | |
*|END:RSSITEMS|*<br /> | |
| |
<h3 class="h3">Recent Articles:</h3> | |
*|RSS:RECENT|* |
This file contains hidden or 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
a span.screen-reader-text { | |
clip: rect(1px, 1px, 1px, 1px); | |
position: absolute !important; | |
height: 1px; | |
width: 1px; | |
overflow: hidden; | |
} |
OlderNewer