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 | |
/* Template Name: Test */ | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed |
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 | |
/** | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.php | |
*/ |
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
genesis_register_sidebar( array( | |
'id' => 'home-slider', | |
'name' => __( 'Home Slider', 'prose' ), | |
'description' => __( 'This is the slider section of the homepage.', 'prose' ), | |
) ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @link http://wpsites.net/web-design/home-page-slider-prose-theme/ | |
*/ |
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 | |
add_action( 'genesis_before', 'child_conditional_actions' ); | |
function child_conditional_actions() { | |
if( /**insert your conditional statements here */ ) { | |
//put your actions here | |
} | |
//you could add additional conditional statements as needed here |
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_action( ‘genesis_before’, ‘remove_post_meta_home_page’ ); | |
function remove_post_meta_home_page() { | |
if( is_home() || is_front_page() ) { | |
remove_action( ‘genesis_after_post_content’, ‘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
genesis_register_sidebar( array( | |
'id' => 'home-custom', | |
'name' => __( 'Home Slider', 'magazine' ), | |
'description' => __( 'This is the slider widget area for your homepage.', 'magazine' ), | |
) ); | |
add_action( 'genesis_before_content_sidebar_wrap', 'child_before_content'); | |
function child_before_content() { | |
if ( is_home() ) { | |
echo '<div id="home-custom">'; |
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_filter( 'genesis_post_meta', 'remove_post_meta_pages' ); | |
function remove_post_meta_pages( $post_meta ) { | |
if ( !is_page() ) { | |
$post_meta = '[post_categories before="' . __( 'Filed Under: ', 'minimum' ) . '"] // [post_tags before="' . __( 'Tagged: ', 'minimum' ) . '"]'; | |
return $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
add_filter( 'genesis_post_meta', 'remove_post_meta_single_posts' ); | |
function remove_post_meta_single_posts( $post_meta ) { | |
if ( is_single() ) { | |
$post_meta = '[post_categories before="' . __( 'Filed Under: ', 'minimum' ) . '"] // [post_tags before="' . __( 'Tagged: ', 'minimum' ) . '"]'; | |
return $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
add_action ( 'genesis_post_content' , 'remove_post_meta_home' ); | |
function remove_post_meta_home() { | |
global $post; | |
if ( is_home () ) | |
remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); | |
} |