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
<?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" /> '; | |
?> | |
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
add_action( 'genesis_before_comments' , 'webendev_comment_count' ); | |
/** | |
* Add comment count and remove standard comment title | |
* | |
*/ | |
function webendev_comment_count () { | |
add_filter( 'genesis_title_comments', '_return_null' ); | |
if ( is_single() ) { | |
if ( have_comments() ) { | |
echo '<h3>'; |
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 | |
/* | |
Plugin Name: Restrict Content Pro - Custom User Fields | |
Description: Illustrates how to add custom user fields to the Restrict Content Pro registration form that can also be edited by the site admins | |
Version: 1.0 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |
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 | |
// 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']; |
OlderNewer