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_post', 'gravity_form_before_content'); | |
function gravity_form_before_content() { | |
if (is_category()) { | |
echo do_shortcode('[gravityform id=1 title=false description=false ajax=true]'); | |
} | |
} |
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 display_slider_header_home() { | |
if ( is_home() && function_exists('easingsliderlite') ) { | |
easingsliderlite(); | |
} | |
}; | |
add_action('genesis_header', 'display_slider_header_home'); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @example http://wpsites.net/web-design/image-slider-home-page-only/ |
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 display_slider_header_home() { | |
if ( is_category() && function_exists('easing_slider') ) { | |
easing_slider(); | |
} | |
}; | |
add_action('genesis_header', 'display_slider_header_home'); |
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 display_slider_header_home() { | |
if ( is_single() && function_exists('easingsliderlite') ) { | |
easingsliderlite(); | |
} | |
}; | |
add_action('genesis_before_post', 'display_slider_header_home'); |
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
update_option('image_default_link_type', 'none') | |
function default_image_link_type() { | |
$image_set = get_option( 'image_default_link_type' ); | |
if ($image_set !== 'post') { | |
update_option('image_default_link_type', 'post'); | |
} | |
} | |
/** |
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 remove_pages_from_search($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'post'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','remove_pages_from_search'); |
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 remove_posts_from_wp_search($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'page'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','remove_posts_from_wp_search'); |
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 remove_post_type_page_from_search() { | |
global $wp_post_types; | |
$wp_post_types['page']->exclude_from_search = true; | |
} | |
add_action('init', 'remove_post_type_page_from_search'); |
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 remove_categories_wp_search($query) { | |
if ( $query->is_search() { | |
$query->set('cat','-1,-10'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','remove_categories_wp_search'); |
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_template('page_blog.php') ) { |