Skip to content

Instantly share code, notes, and snippets.

@robhob
robhob / .htaccess
Created November 26, 2018 11:54 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@robhob
robhob / more-divi-social-icons.php
Last active November 24, 2018 13:45 — forked from SJ-James/more-divi-social-icons.php
Divi social icons extension
<?php // << Remove opener if adding to functions.php
if ( ! function_exists( 'et_load_core_options' ) ) {
function et_load_core_options() {
global $shortname, $themename;
require_once get_template_directory() . esc_attr( "/options_{$shortname}.php" );
$newOptions = [];
foreach ($options as $i => $optionArray) {
$newOptions[] = $optionArray;
if (isset($optionArray['id']) && $optionArray['id'] == 'divi_show_google_icon') {
@robhob
robhob / In your functions file
Created November 24, 2018 13:30 — forked from mrkdevelopment/In your social icons file
Divi social icons extension
/**
* Loads theme settings
*
*/
if ( ! function_exists( 'et_load_core_options' ) ) {
function et_load_core_options() {
global $shortname, $$themename;
require_once get_template_directory() . esc_attr( "/options_{$shortname}.php" );
@robhob
robhob / remove-imagezoom-woocom.php
Last active August 18, 2017 06:52 — forked from rynaldos-zz/remove-pgzoom-theme.php
[WooCommerce 3.0+] Remove product gallery zoom feature
add_action( 'after_setup_theme', 'remove_pgz_theme_support', 100 );
function remove_pgz_theme_support() {
remove_theme_support( 'wc-product-gallery-zoom' );
}