|

iOS specific CSS

To target iOS specific devices: @supports (-webkit-overflow-scrolling: touch) { /* CSS specific to iOS devices */ } @supports not (-webkit-overflow-scrolling: touch) { /* CSS for other than iOS devices */ } It works because only Safari Mobile implements -webkit-overflow-scrolling: https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling I used this because a WordPress Genesis responsive menu had some icon alignment discrepancies on iPhone only. Here is…

Woocommerce Logged in Only

Restrict Woocommerce pages to logged in usesrs only: /****************** Logged in Only *************************/ function woo_loggedin_redirect() { if ( ! is_user_logged_in() && (is_woocommerce() || is_cart() || is_checkout()) ) { // feel free to customize the following line to suit your needs wp_redirect(home_url()); exit; } } add_action(‘woo-loggedin_redirect’, ‘woo_loggedin_redirect’);  

|

Woocommerce Widget Featured Product by Category

In Woocommerce > Includes > Widgets > class-wc-widget-products.php Add at line 70: ‘in_cat’ => array( ‘type’ => ‘text’, ‘std’ => __( ‘Category Number’, ‘woocommerce’ ), ‘label’ => __( ‘In Category’, ‘woocommerce’ ) ), Add at line 101: $cat = ! empty( $instance[‘in_cat’] ) ? sanitize_title( $instance[‘in_cat’] ) : $this->settings[‘in_cat’][‘std’]; Add at line 114: array( ‘taxonomy’…