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
// Customize the next page link | |
add_filter ( 'genesis_next_link_text' , 'custom_next_link_text' ); | |
function custom_next_link_text ( $text ) { | |
return g_ent( '» ' ) . __( 'Custom Next Page Link', CHILD_DOMAIN ); | |
} | |
// Customize the previous page link | |
add_filter ( 'genesis_prev_link_text' , 'custom_prev_link_text' ); | |
function custom_prev_link_text ( $text ) { | |
return g_ent( '« ' ) . __( 'Custom Previous Page Link', CHILD_DOMAIN ); |
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
// Force content-sidebar layout setting | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | |
// Force sidebar-content layout setting | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content' ); | |
// Force content-sidebar-sidebar layout setting | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar_sidebar' ); | |
// Force sidebar-sidebar-content layout setting |
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 FOLLOWING CODE TO FUNCTIONS FILE | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
// Register Genesis Menus | |
add_theme_support ( 'genesis-menus' , array ( 'primary' => 'Primary Navigation Menu' , 'secondary' => 'Secondary Navigation Menu' ,'top' => 'Top Navigation Menu' ) ); | |
// Add Custom Top Navigation | |
add_action('genesis_before_header', 'custom_top_nav'); | |
function custom_top_nav() { | |
echo '<nav class="nav-top" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">'; |
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( 'admin_menu', 'we_remove_shareaholic_menu' ); | |
/** | |
* Remove Shareaholic (Sexybookmarks)plugin from admin menu | |
* | |
*/ | |
function we_remove_shareaholic_menu() { | |
if ( ! is_admin() ) | |
return; | |
if ( is_plugin_active('sexybookmarks/sexy-bookmarks.php') && ( ! current_user_can( 'manage_options' ) ) ) { |
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_filter( 'the_content', 'we_addlightboxrel_replace', 12 ); | |
add_filter( 'get_comment_text', 'we_addlightboxrel_replace' ); | |
/** | |
* Add rel tag to links for Lightbox | |
*/ | |
function we_addlightboxrel_replace($content){ | |
global $post; | |
$pattern = "/<a(.*?)href=('|\")([^>]*).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>(.*?)<\/a>/i"; | |
$replacement = '<a$1href=$2$3.$4$5 rel="prettyPhoto"$6>$7'; | |
$content = preg_replace($pattern, $replacement, $content); |
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
/* 4 column Gravity Forms custom ready class ------------------------------------------------------*/ | |
.gform_wrapper .top_label li.gfield.gf_first_quarter, | |
.gform_wrapper .top_label li.gfield.gf_second_quarter, | |
.gform_wrapper .top_label li.gfield.gf_third_quarter, | |
.gform_wrapper .top_label li.gfield.gf_fourth_quarter { | |
margin:0 0 8px 0; | |
width:24%; | |
} |
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( 'init', 'we_manage_woo_styles', 99 ); | |
define( 'WOOCOMMERCE_USE_CSS', false ); | |
/** | |
* Remove all WooCommerce scripts and styles | |
* | |
* @author WP Smith | |
* @since 1.0.0 | |
*/ | |
function we_manage_woo_styles() { | |
if ( 'product' !== get_post_type() && !is_page( 'cart' ) && !is_page( 'checkout' ) ) { |
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_filter( 'show_admin_bar' , 'webendev_hide_admin_bar'); | |
/** | |
* Hide Toolbar (Admin Bar) on front end for all except Administrators | |
* | |
*/ | |
function webendev_hide_admin_bar($content) { | |
return ( current_user_can( 'administrator' ) ) ? $content : false; | |
} |
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_filter( 'wp_mail_from', 'webendev_change_default_wp_email' ); | |
/** | |
* Change Default WP Email Address (instead of from [email protected]) | |
* | |
*/ | |
function webendev_change_default_wp_email(){ | |
return '[email protected]'; | |
} |
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_filter( 'wp_mail_from_name', 'webendev_change_default_wp_email_name' ); | |
/** | |
* Change Default WP Email 'From Name'(instead of from WordPress) | |
* | |
*/ | |
function webendev_change_default_wp_email_name(){ | |
return 'My Real Name'; | |
} |