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( 'wp_enqueue_scripts', 'wsm_custom_stylesheet' ); | |
function wsm_custom_stylesheet() { | |
wp_enqueue_style( 'custom-style', get_stylesheet_directory_uri() . '/custom.css' ); | |
} |
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 the opening php tag above | |
/** | |
* Customize the default text inside of search box | |
*/ | |
add_filter( 'genesis_search_text', 'custom_search_box_text' ); | |
function custom_search_box_text( $text ) { | |
return esc_attr( 'Search our website...' ); |
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 styling | |
function my_login_stylesheet() { | |
$mycustomcssurl = plugins_url( 'custom.css', __FILE__ ); | |
wp_register_style( 'custom-css', $mycustomcssurl,'','', 'screen' ); | |
wp_enqueue_style( 'custom-css' ); | |
} | |
add_action( 'login_enqueue_scripts', 'my_login_stylesheet' ); |
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
.divclassname { | |
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); | |
-moz-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); | |
-webkit-box-shadow: 0 3px 6px rgba(0,0,0, .2); | |
background: #fff; | |
margin: 0 3px 40px; | |
padding: 20px 0 0; | |
} |
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 new image size to WordPress | |
////////////////////////////////// | |
add_image_size( 'catalog', 490, 340, array( 'center', 'top' ) ); // Hard crop center top | |
// make the new size available in the media library (and image element etc.) | |
add_filter( 'image_size_names_choose', 'my_custom_images' ); | |
function my_custom_images( $sizes ) { | |
return array_merge( $sizes, array( | |
'catalog' => __( 'Catalogue 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
////////////////////////////////// | |
// Enable Shortcodes to be used in the child theme | |
////////////////////////////////// | |
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); | |
function avia_include_shortcode_template($paths) | |
{ | |
$template_url = get_stylesheet_directory(); | |
array_unshift($paths, $template_url.'/shortcodes/'); | |
return $paths; |
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 short description to the product loop | |
add_action('woocommerce_after_shop_loop_item_title','woocommerce_template_single_excerpt', 5); |
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
/* Reduce the Latest News Widget excerpt to X words */ | |
function custom_excerpt_length( $length ) { | |
return X; | |
} | |
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); |
OlderNewer