Instantly share code, notes, and snippets.

View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
View .htaccess
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
View svg-support.js
* Replace all SVG images with inline SVG
StackExchange thread:
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
View _functions.php
//* Customize Footer
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'custom_footer' );
function custom_footer() {
<p>&copy; Copyright 2018 <a href="#">My Domain</a> &middot; All Rights Reserved &middot; Powered by <a href="">WordPress</a> &middot; <a href="">Aline Inc.</a></p>
//* Remove the edit link
add_filter ( 'genesis_edit_post_link' , '__return_false' );
View index.html
<div class="container-about-us">
<ul class="white about-us">
<li><a href="#" class="text-a-about">Web Design</a></li>
<li><a href="#" class="text-a-about">Marketing</a></li>
<li><a href="#" class="text-a-about">SEO</a></li>
View functions.php
//Change search form text
function themeprefix_search_button_text( $text ) {
return ( 'Search text goes here...');
add_filter( 'genesis_search_text', 'themeprefix_search_button_text' );
View functions.php
<!-- Add shortcode to sidebar widget area -->
add_filter( 'widget_text', 'do_shortcode' );
View function.php
<div class="search-field">
<?php get_search_form(); ?>
View index.mysql
UPDATE wp_options SET option_value = replace(option_value, 'Existing URL', 'New URL') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'Existing URL', 'New URL');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'Existing URL','New URL');
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'Existing URL','New URL');
UPDATE wp_links SET link_url = replace(link_url, 'Existing URL','New URL');
View functions.php
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );