Skip to content

Instantly share code, notes, and snippets.

// Add our own Jquery
if (wp_script_is('jquery', 'enqueued')) {
return;
} else {
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js',true, '3.4.1' );
wp_enqueue_script('jquery');
}
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /newsite/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dev/index.php [L]
</IfModule>
# END WordPress
@gweatherson
gweatherson / stripping-out-wordpress-plugin-inline-styles
Created July 8, 2014 21:08
remove nasty inline styles provided by Wordpress plugins
jQuery(document).ready(function($) {
$(".shitty-wordpress-plugin-element").removeAttr( "style" );
});
@gweatherson
gweatherson / gulp mamp browser sync
Created February 9, 2014 03:26
gulp browser sync for mamp
gulp.task('browser-sync', function() {
browserSync.init(['css/*.css', 'js/*.js'], { // files to inject
proxy: {
host: "localhost",
port: 8888
}
});
});
@gweatherson
gweatherson / gulpfile
Created February 5, 2014 05:38
why isn't this compiling upon file changes for css & js?
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
// jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
// imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),