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
/* | |
* There's a bug in Chrome/Safari using overflow:hidden with border-radius. This mask fixes it. | |
* Solution: http://stackoverflow.com/questions/5736503/how-to-make-css3-rounded-corners-hide-overflow-in-chrome-opera/10296258#10296258 | |
*/ | |
.masked { | |
position: absolute; | |
border-radius: 10px; | |
overflow: hidden; | |
/* this fixes the overflow:hidden in Chrome */ | |
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC); |
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
# Get rid of the default crap | |
wp site empty --yes | |
# Remove Hello Dolly (sorry Matt) | |
wp plugin uninstall hello | |
# Install Genesis framework | |
wp theme install <super-secret-url-for-genesis> | |
# Install plugins available in repo |
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
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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 | |
/** | |
* This file adds the category archive template. | |
* | |
*/ | |
//* Force full width content layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
//* Remove the breadcrumb navigation |
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
// Enqueue scripts and styles | |
add_action( 'wp_enqueue_scripts', 'custom_scripts_styles_mobile_responsive' ); | |
function custom_scripts_styles_mobile_responsive() { | |
wp_enqueue_script( 'beautiful-responsive-menu', get_stylesheet_directory_uri() . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); | |
wp_enqueue_style( 'dashicons' ); | |
} |
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 | |
//* Custom loop WITH pagination | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'bhl_do_resident_query' ); | |
function bhl_do_resident_query() { | |
global $paged; | |
global $query_args; |
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
/** | |
* Each of these samples can be used - note that you should pick one rather than add them all. | |
* | |
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
**/ | |
/** | |
* Add a content block after all notices, such as the login and coupon notices. | |
* |
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 | |
/* This file is taken directly from a clients site so it contains strings and conditions not necessarily useful to anyone else. | |
However it does show how one can use these filters to modify the meta information for the different filtered results */ | |
/* CHANGE META DESCRIPTION ON KLINIK FILTER PAGES */ | |
add_filter('wpseo_metadesc', 'custom_metadesc', 10, 1); | |
function custom_metadesc($desc){ | |
if(is_tax(array('omrade', 'yrkeskategori', 'specialisering', 'betalningsmedel', 'forsakringsbolag'))){ | |
global $wp_query; | |
$termID = $wp_query->queried_object->term_id; |
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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme', 'sensei_support' ); | |
function sensei_support() { | |
add_theme_support( 'sensei' ); |
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 | |
//PASTE THIS CODE IN A PLUGIN LIKE My Custom Functions (RECOMMENDED) OR IN YOUR THEME'S functions.php FILE | |
//THIS ASSUMES YOU HAVE THE GOOGLE ANALYTICS JAVASCRIPT INCLUDED ALREADY | |
function echo_ga_tracking_script() { | |
if(isset($_GET['membership']) && isset($_GET['trans_num'])) { | |
$txn = MeprTransaction::get_one_by_trans_num($_GET['trans_num']); | |
if(isset($txn->id) && $txn->id > 0) { | |
//Echo the script to the HTML <head> | |
?> |
OlderNewer