This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Run this code on 'after_theme_setup', when plugins have already been loaded. | |
add_action('after_setup_theme', 'my_load_plugin'); | |
// This function loads the plugin. | |
function my_load_plugin() { | |
// Check to see if your plugin has already been loaded. This can be done in several | |
// ways - here are a few examples: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add to existing function.php file | |
// Disable support for comments and trackbacks in post types | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ($post_types as $post_type) { | |
if(post_type_supports($post_type, 'comments')) { | |
remove_post_type_support($post_type, 'comments'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Core output | |
**/ | |
//Remove the generator tag | |
remove_action('wp_head', 'wp_generator'); | |
//Remove the frontend admin bar while in development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Code taken from the plugin 'Remove Comments Absolutely' by Frank Bültge | |
* http://wpengineer.com/2230/removing-comments-absolutely-wordpress/ | |
* https://github.com/bueltge/Remove-Comments-Absolutely/blob/master/remove-comments-absolute.php | |
* http://bueltge.de/ | |
*/ | |
if ( ! class_exists( 'Remove_Comments_Absolute' ) ) { | |
add_action( 'plugins_loaded', array( 'Remove_Comments_Absolute', 'get_object' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Simple Popular Posts Lite | |
Plugin URI: - | |
Description: - | |
Version: 2015.03.01 | |
Author: khromov | |
Author URI: http://snippets.khromov.se | |
License: GPL2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install wp2ssl (https://github.com/niladam/wp2ssl) | |
curl -sSL https://wp2ssl-installer.includes.io | bash | |
# cd into WordPress | |
wp2ssl | |
# Now enjoy :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.htaccess | |
# Re-direct wp-content/uploads to subdomain | |
RewriteRule wp-content/uploads/(.*) http://uploads.example.com/$1 [R=301,L] | |
wp-config.php | |
// Make sure that we put uploads in the right place | |
update_option( | |
'upload_url_path', | |
'http://uploads.aubreypwd.com' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assets/scripts/customizer.js | |
(function($) { | |
// Primary colour | |
wp.customize('primary_colour', function(value) { | |
value.bind(function(to) { | |
$('head').append('<style>.Primary-bg-c{background-color:'+ to +' !important;}</style>'); | |
$('head').append('<style>.Primary-c{color:'+ to +' !important;}</style>'); | |
$('head').append('<style>.Primary-c--hover:hover{color:'+ to +' !important;}</style>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------ | |
Gravity Forms | |
---------------------------------------*/ | |
.gform_wrapper ul { padding-left: 0; list-style: none } | |
.gform_wrapper li { margin-bottom: 15px } | |
.gform_wrapper form { margin-bottom: 0 } |