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
function after_post_text() { | |
echo '<div class="title-text">Add Text after all single posts here</div>'; | |
}; | |
add_action('genesis_after_post_content', 'after_post_text'); |
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
// Register custom widget | |
genesis_register_sidebar( array( | |
'id' => 'after-content', | |
'name' => __( 'After Post Content', 'child' ), | |
'description' => __( 'This widget executes after your single posts content.', 'child' ), | |
) ); | |
// Hook widget after single post content only | |
add_action( 'genesis_after_post_content', 'widget_after_content', 9 ); | |
function widget_after_content() { |
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' => 'text-before-blog', | |
'name' => 'Text Before Blog', | |
'description' => 'This is the widget for displaying text before blog posts.', | |
) ); | |
add_action('genesis_before_content', 'apparition_text_before_blog' ); | |
function apparition_text_before_blog() { | |
if( is_page(139) ) { |
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_header', 'display_header_image'); | |
function display_header_image(){ | |
echo '<div class="header-image"><img src="http://yourdomain.com/images/header.png" alt="header logo" /></div>'; | |
} |
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
function wpsites_exclude_category_posts($query) { | |
if ($query->is_cat) { | |
$query->set('cat','-007'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','wpsites_exclude_category_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
genesis_register_sidebar( array( | |
'id' => 'before-content', | |
'name' => __( 'Custom Widget', 'child' ), | |
'description' => __( 'This is the before content widget.', 'child' ), | |
) ); | |
// Hook before-post widget to single page | |
add_action( 'genesis_before_content_sidebar_wrap', 'custom_before_content', 9 ); | |
function custom_before_content() { | |
if ( is_single() && is_active_sidebar( 'before-content' ) ) { |
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( 'pre_get_posts', 'exclude_category_posts_home' ); | |
function exclude_category_posts_home( $query ) { | |
if( $query->is_main_query() && $query->is_home() ) { | |
$query->set( 'cat', '-32' ); | |
} | |
} |
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 if ( is_home() && function_exists('easingsliderlite') ) { easingsliderlite(); } ?> |
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 if ( is_front_page() && function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?> |
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_header', 'wpsitesdotnet_slider_header_home'); | |
/** | |
* @author Brad Dalton | |
* @example http://wpsites.net/web-design/executing-shortcodes-in-hook-locations-using-functions/ | |
* @copyright 2014 WP Sites | |
*/ | |
function wpsitesdotnet_slider_header_home() { | |
if (is_home()) { | |
echo do_shortcode('[easingsliderlite]'); | |
} |