Skip to content

Instantly share code, notes, and snippets.

View frankschrijvers's full-sized avatar

WPStudio frankschrijvers

View GitHub Profile
@frankschrijvers
frankschrijvers / style.css
Created July 18, 2017 15:06
Styling for more input fields opt in widget hanvana theme
.enews-widget input[type=email],
.enews-widget input[type=text] {
border: 1px solid #eee;
max-width: calc(38% - 20px);
float: left;
}
@frankschrijvers
frankschrijvers / text.html
Created July 12, 2017 08:31
button textwidget
<a class="button" href="#">read more</a>
@frankschrijvers
frankschrijvers / textwidget.html
Last active February 17, 2017 15:16
textwidget.html Accent Pro theme
Don't miss the new seasons 2017 look book!<div class="button"><a href="#">learn more</a></div>
@frankschrijvers
frankschrijvers / functions.php
Created March 2, 2016 15:12
How to hide trailing zeros on prices in WooCommerce
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
// Hide trailing zeros on prices.
add_filter( 'woocommerce_price_trim_zeros', 'wc_hide_trailing_zeros', 10, 1 );
function wc_hide_trailing_zeros( $trim ) {
return true;
}
@frankschrijvers
frankschrijvers / functions.php
Created April 25, 2016 10:11
Loads Pinterest pin-it script
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Loads Pinterest pin-it script
add_action( 'wp_enqueue_scripts', 'wps_load_scripts' );
function wps_load_scripts() {
if ( is_product() ) {
wp_enqueue_script( 'pin-it', '//assets.pinterest.com/js/pinit.js', array('jquery'), null );
}
@frankschrijvers
frankschrijvers / functions.php
Last active October 24, 2016 02:40
Display field value on the WooCommerce order edition page and emails
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Display field value on the order edition page
add_action( 'woocommerce_admin_order_data_after_billing_address', 'wps_select_checkout_field_display_admin_order_meta', 10, 1 );
function wps_select_checkout_field_display_admin_order_meta($order){
echo '<p><strong>'.__('Delivery option').':</strong> ' . get_post_meta( $order->id, 'daypart', true ) . '</p>';
}
@frankschrijvers
frankschrijvers / banner-widget.html
Last active October 6, 2016 10:39
Add banner to widget area
<a href="https://www.wpstud.io"><img src="place the url of your banner here"></a>
@frankschrijvers
frankschrijvers / fuctions.php
Created September 19, 2016 09:03
Add more categories
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
case 'clothing':
return __('Order your Clothes', 'your_theme_text_domain' );
break;
case 'hoodies':
return __('buy your Hoodie', 'your_theme_text_domain' );
break;
@frankschrijvers
frankschrijvers / style.css
Last active September 15, 2016 08:10
Styling sidebars Whitespace Pro
/* Sidebar
---------------------------------------------------------------------------------------------------- */
.content-sidebar .content,
.sidebar-content .content {
width: 100%;
}
.content-sidebar .sidebar-primary,
.sidebar-content .sidebar-primary {
width: 100%;
@frankschrijvers
frankschrijvers / functions.php
Created September 15, 2016 07:49
remove forced full width layout
//* Force full-width-content layout setting
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );