Skip to content

Instantly share code, notes, and snippets.

@wpflames
wpflames / style.scss
Created January 25, 2021 17:59
CSS for Social Icons SVG
ul.social{
display: flex;
max-width: 160px;
justify-content: space-between;
li{
list-style: none;
}
}
@wpflames
wpflames / functions.php
Created January 25, 2021 18:18
Remove “Built with Storefront & WooCommerce” text
<?php
// =========================================================================
// REMOVE STOREFRONT FOOTER CREDIT TEXT
// =========================================================================
function remove_sf_actions() {
remove_action( 'storefront_footer', 'storefront_credit', 20);
}
add_action( 'init', 'remove_sf_actions' );
@wpflames
wpflames / functions.php
Created January 25, 2021 18:19
Storefront custom footer
<?php
// =========================================================================
// CUSTOM FOOTER STOREFRONT
// =========================================================================
function storefront_custom_footer() {
include('templates/footer.php');
}
add_action( 'storefront_footer', 'storefront_custom_footer' );
@wpflames
wpflames / functions.php
Created January 25, 2021 18:20
FOOTER COPYRIGHT
<?php
// =========================================================================
// FOOTER COPYRIGHT
// =========================================================================
function storefront_footer_copyright(){
echo '<div class="copyright">'.date('Y').' &copy; YOUR COMANY</div>';
}
add_action( 'storefront_after_footer', 'storefront_footer_copyright' );
@wpflames
wpflames / footer.php
Created January 25, 2021 18:30
Three column footer with social icons
@wpflames
wpflames / style.scss
Created January 25, 2021 18:31
Site footer scss
/* SITE-FOOTER
/************************************/
.site-footer {
padding-top: 60px !important;
.grid-item{
h4{
text-align: center;
margin-bottom: 30px;
}
p{
@wpflames
wpflames / functions.php
Created January 25, 2021 19:01
Storefront Cover to Homepage
<?php
// =========================================================================
// STOREFRONT COVER - HOMEPAGE
// =========================================================================
function add_storefront_cover(){
if ( is_front_page() ){
include('templates/cover.php');
}
}
@wpflames
wpflames / functions.php
Created March 17, 2021 08:18
Add featured image to Genesis single post
<?php
// =========================================================================
// ADD FEATURED IMAGE TO GENESIS SINGLE
// =========================================================================
function add_featured_img_to_single_pages(){
echo get_the_post_thumbnail( $page->ID, 'full' );
}
add_action('genesis_entry_content', 'add_featured_img_to_single_pages', 1);
@wpflames
wpflames / functions.php
Last active March 17, 2021 08:28
Change Previous / Next text in Genesis Pagination
<?php
// =========================================================================
// CHANGE PREVIOUS / NEXT LINK TEXT IN GENESIS PAGINATION
// =========================================================================
function change_previous_link_text($text) {
$text = 'Custom Previous Text';
return $text;
}
add_filter( 'genesis_prev_link_text', 'change_previous_link_text' );
@wpflames
wpflames / functions.php
Created March 18, 2021 09:49
Filter woocommerce orders by payment method
<?php
// =========================================================================
// ADD PAYMENT METHOD BULK FILTER FOR ORDERS
// =========================================================================
function add_filter_by_payment_method_orders() {
global $typenow;
if ( 'shop_order' === $typenow ) {
// get all payment methods
$gateways = WC()->payment_gateways->payment_gateways();