Skip to content

Instantly share code, notes, and snippets.

Avatar

WPStudio frankschrijvers

View GitHub Profile
View install-restic.txt
curl -LO https://github.com/restic/restic/releases/download/v0.9.5/restic_0.9.5_linux_amd64.bz2
View contact-page.css
.page-contact .site-footer {
background-color: #000;
color: #fff;
}
@frankschrijvers
frankschrijvers / page-slug-body-class.php
Last active Jun 20, 2019
Add Page Slug as Body Class
View page-slug-body-class.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_filter( 'body_class', 'wps_add_slug_body_class' );
/**
* Add Page Slug as Body Class.
*/
function wps_add_slug_body_class( $classes ) {
global $post;
@frankschrijvers
frankschrijvers / woocommerce-show-payment-method.php
Created May 7, 2019
Add Payment Method Column to Admin Orders
View woocommerce-show-payment-method.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_filter( 'manage_edit-shop_order_columns', 'wps_add_payment_method_column', 20 );
/**
* Add payment method column
*/
function wps_add_payment_method_column( $columns ) {
$new_columns = array();
@frankschrijvers
frankschrijvers / style.css
Created Jul 18, 2017
Styling for more input fields opt in widget hanvana theme
View style.css
.enews-widget input[type=email],
.enews-widget input[type=text] {
border: 1px solid #eee;
max-width: calc(38% - 20px);
float: left;
}
View text.html
<a class="button" href="#">read more</a>
@frankschrijvers
frankschrijvers / functions.php
Last active Feb 12, 2019
Set WooCommerce product button text to productname
View functions.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_filter( 'woocommerce_product_single_add_to_cart_text', 'wps_custom_cart_button_text' );
/**
* Set product button text to productname
*/
function wps_custom_cart_button_text() {
global $product;
@frankschrijvers
frankschrijvers / textwidget.html
Last active Feb 17, 2017
textwidget.html Accent Pro theme
View textwidget.html
Don't miss the new seasons 2017 look book!<div class="button"><a href="#">learn more</a></div>
@frankschrijvers
frankschrijvers / banner-widget.html
Last active Oct 6, 2016
Add banner to widget area
View banner-widget.html
<a href="https://www.wpstud.io"><img src="place the url of your banner here"></a>
View fuctions.php
<?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;
You can’t perform that action at this time.