View rss-mailchimp-email
*|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|* |
View add-cpt-to-rss.php
<?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' ); |
View taxonomy-filter.php
<?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 ); |
View remove-post-info-for-cpt.php
<?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' ); | |
} | |
} |
View conditional-tag-for-multiple-cpt.php
<?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' ); |
View remove-home-page-title.php
//* 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' ); | |
} | |
} |
View add-image-to-single
// 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' ) ); |
View add-multiple-genesis-grid-loops
<?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( |
View after-entry-widget.php
<?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 |
NewerOlder