This file contains 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 these filters in functions.php | |
add_filter( 'meta_content', 'wptexturize' ); | |
add_filter( 'meta_content', 'convert_smilies' ); | |
add_filter( 'meta_content', 'convert_chars' ); | |
add_filter( 'meta_content', 'wpautop' ); | |
add_filter( 'meta_content', 'shortcode_unautop' ); | |
add_filter( 'meta_content', 'prepend_attachment' ); | |
This file contains 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
if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) || is_active_sidebar( 'home-featured-4' ) ) { | |
//* Add Home featured Widget areas | |
add_action( 'genesis_before_content_sidebar_wrap', 'minimum_home_featured', 15 ); | |
} | |
This file contains 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 //do not include this php tag | |
add_action ('genesis_after_entry', 'my_custom_loop_func'); | |
function my_custom_loop_func() { | |
if(is_home()) | |
{ | |
global $wp_query; | |
if( 2 == $wp_query->current_post ) { |
This file contains 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
// Show Footer Widget Areas only on homepage | |
add_action( 'genesis_after_content_sidebar_wrap', 'sk_footer_widget_areas' ); | |
function sk_footer_widget_areas() { | |
if ( is_home() || is_front_page() ) | |
return; | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
} |
This file contains 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 to functions.php and leave the “Content” box unticked in Settings > Mandrill | |
// Be sure to omit the opening <?php tag when copying this code | |
// Add paragraph breaks to plain text notifications sent by Mandrill | |
add_filter('mandrill_payload', 'wpmandrill_auto_add_breaks'); | |
function wpmandrill_auto_add_breaks($message) { | |
$html = $message['html']; |
This file contains 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 // don't include this line since your functions.php file should already have this. | |
function si_redirect_after_estimate_approval() { | |
if ( 'estimate' !== si_get_doc_context() ) { | |
return; | |
} | |
?> | |
<script type="text/javascript"> | |
jQuery(document).on('status_updated', function(e) { | |
window.location = window.location.pathname + '?redirect_after_status=1'; |
This file contains 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 | |
function pw_rcp_login_redirect( $redirect_to, $request, $user ) { | |
$status = rcp_get_status( $user->ID ); | |
switch( $status ) { | |
case 'expired' : | |
case 'pending' : |
This file contains 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 everything except for this opening line to your functions file | |
add_filter( 'wp_nav_menu_items', 'sp_add_loginout_link', 10, 2 ); | |
function sp_add_loginout_link( $items, $args ) { | |
// Change 'primary' to 'secondary' to put the login link in your secondary nav bar. | |
if ( $args->theme_location != 'primary' ) { | |
return $items; | |
} | |
This file contains 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 | |
function upload_image_metabox() { | |
echo '<p><strong>Upload image</strong></p>'; | |
echo '<input type="text" id="child_logo_url" name="' . $this->get_field_name( 'welcome-image' ) . '" value="' . esc_attr( $this->get_field_value( 'welcome-image' ) ) . '" size="50" />'; | |
echo '<input id="child_upload_logo_button" type="button" class="button" value="Upload Image" /> '; | |
?> | |
OlderNewer