No longer kept up to date.
Please see Sridhar's fork.
/**** Truly Force Layout without allowing the User to Override the preferred/recommended layout ****/ | |
// Force Full Width Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
// Force Content-Sidebar Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' ); | |
// Force Sidebar-Content Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_content' ); |
<?php | |
/** | |
* Template Name: Testimonial Archives | |
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive | |
*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop |
<?php | |
add_action('genesis_before_post_title', 'sfws_homepage_teaser_image'); | |
/** | |
* Adds Images to Posts in Grid | |
* | |
* Takes the amount of posts and applies the right size image, whether it's a featured post or a grid block post. | |
* | |
* @category Grid Loop | |
* @author Jonathan Perez, SureFireWebServices <[email protected]> |
<?php | |
wp_nav_menu( array( | |
'menu' => 'Menu Name', | |
'sub_menu' => true, | |
'direct_parent' => true | |
) ); |
<?php | |
add_filter( 'genesis_attr_content', 'yoast_schema_empty', 20 ); | |
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 ); | |
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 ); | |
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 ); | |
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 ); | |
/** | |
* We'll use the post info output to add more meta data about the event. |
function add_genesis_before_post () { | |
echo '<div class="before-post">genesis_before_post</div>'; | |
}; | |
add_action('genesis_before_post', 'add_genesis_before_post'); | |
function add_genesis_before_post_title() { | |
echo '<div class="before-post-title">genesis_before_post_title</div>'; |
input[type="checkbox"], | |
input[type="radio"] { | |
width: 20px; | |
margin: 0 0 3px 3px; | |
vertical-align: middle; | |
} |
<?php | |
# Register custom post types on the 'init' hook. | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 1.0.0 | |
* @access public |
No longer kept up to date.
Please see Sridhar's fork.
<?php | |
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 ); | |
function oembed_fix_twitter( $providers ) { | |
$providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( 'https://api.twitter.com/1/statuses/oembed.{format}', true ); | |
return $providers; | |
} |