Skip to content

Instantly share code, notes, and snippets.

View KerryCarron's full-sized avatar

Kerry Carron KerryCarron

View GitHub Profile
@KerryCarron
KerryCarron / wp-config.php
Created October 22, 2018 21:41
Base Build WP Config file with Options
/* tThis file goes into your website domain's root level directory
/* This file was shared by Hugh Smith during the 2018-10-22-Web Wonders Webinar (https:ownwp.com): Builing a Base for Development Productivity.
*/
<?php
/*
Additional notes for this gist:
- You'll see that half of the constants are commented out. Nice to
have them there when needed.
- Using a non-standard WP directory structure.
- See BuB note below. Possible items to change during migration:
@KerryCarron
KerryCarron / ContentCopyCure.php
Last active October 22, 2018 21:35
Protect your content - Adds your RSS link to the end of all your content even when scraped
//Add this code to the functions.php file of your WordPress website child theme.
//It will add your RSS link to any content scraped or stolen, sending readers back to your RSS
// From the 2018-10-15 OwnWP Webinar (https://ownwp.com): RSS Tips and Tricks
function embed_rss($content) {
if(is_feed())
$content .= "&lt;p&gt;&lt;a href='". get_permalink() ."'&gt;'";
$content .= get_the_title() ."&lt;/a&gt;&lt;/p&gt;";
return $content;
@KerryCarron
KerryCarron / html
Last active August 29, 2015 14:27 — forked from micheleroper/html
Acri Widget FIles edits
// GOOGLE MAP UPDATE - be sure to change the form ID in this code to the real Map ID number from the site
[one_half]
<h4>Use the form below to contact your manager.</h4>
<h3><a href="http://acrirlty.com"><img class="alignleft" src="https://s3.amazonaws.com/acri/Acri-Greater-Pittsburgh-Property-Management.png" alt="Acri Community Realty" width="170" height="170" /></a>Acri Community Realty</h3>
<div>Greater Pittsburgh Property Management</div>
<div>290 Perry Highway
Pittsburgh, PA 15229</div>
<div>Phone: 412-459-0111</div>
<div>email: info@acrirlty.com</div>
@KerryCarron
KerryCarron / lets-go.custom_jquery_additions.js
Last active March 4, 2016 03:37
ABC Summer School Builder Child theme Javascript file
jQuery(document).ready(function() {
// Adding Mobile Menu Toggle
var nav = jQuery('.builder-module-navigation');
jQuery.each( nav, function(){
if ( !jQuery(this).hasClass('secondary-navigation') ) {
var menu = jQuery(this).find('.menu');
menu.addClass("it-mobile-menu-hidden");
}
@KerryCarron
KerryCarron / lets-go.responsive.css
Created July 21, 2015 05:46
Let's Go Child Theme Responsive CSS
.builder-module-element {
padding-bottom: 3em;
}
.single .builder-module-element {
padding-bottom: 0;
}
.builder-module-widget-bar .widget-background-wrapper {
margin-right: 0;
}
.left .builder-module-sidebar-with-element .widget-background-wrapper:last-child {
@KerryCarron
KerryCarron / lets-go.style-mobile.css
Created July 21, 2015 05:44
Let's Go Child Theme Mobile Style CSS
/*********************************************
Mobile Menu
*********************************************/
.mobile.builder-module-navigation .it-mobile-menu-hidden {
display: none;
margin-bottom: 1em;
}
.nav-with-logo .builder-module-element .builder-module-navigation-menu-wrapper,
@KerryCarron
KerryCarron / lets-go.footer.php
Created July 21, 2015 05:33
Let's Go Child Theme Footer File
@KerryCarron
KerryCarron / lets-go.style.css
Last active August 29, 2015 14:25
Let's Go Child Theme Modules CSS
/*********************************************
Button Link Styles
(from Summit)
*********************************************/
.btn,
.more-link,
.loop-utility a,
input[type="submit"],
input[type="button"] {
@KerryCarron
KerryCarron / lets-go.functions.php
Last active August 29, 2015 14:25
Let's Go Theme Specific Functions
<?php
// Add information within this file to an existing functions.php - Remember to replace or add to existing code.
// To add an array of options to what we want to address specifically when designing for mobile-friendly version of site
add_theme_support( 'builder-responsive', array('tablet-width' => '800px', 'mobile-width' => '400px' ) );
// Enqueuing and Using Custom Javascript/jQuery
function custom_load_custom_scripts() {
wp_enqueue_style( 'dashicons' );
if ( file_exists( get_stylesheet_directory() . '/js/custom_jquery_additions.js' ) )