This file contains hidden or 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
.vk-modal--overlay { | |
display: block; | |
z-index: -1; | |
position: fixed; | |
top: 100%; | |
left: 0; | |
width: 100vw; | |
height: 100vh; | |
/* background-color: rgba(252, 124, 86, 0.7); */ | |
background-color: rgba(17, 158, 230, 0.7); |
This file contains hidden or 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
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image | |
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist. | |
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 ); | |
function spinner_url( $image_src, $form ) { | |
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder | |
} |
This file contains hidden or 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 | |
/* | |
* Hide Native WP Thumbnail Meta Boxes by Page ID | |
* Note: I really should switch this to check page template, not page ID | |
*/ | |
function hide_native_thumbnail_meta_box() { | |
// Store our page ID's | |
$excluded_page_ids_array = array(6,91,225,84); | |
// Get Post ID | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; |
This file contains hidden or 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 | |
/* | |
* Hide WP Editor for Specific Page IDs | |
* Note: I really should update this to be by page template | |
*/ | |
function hide_native_wysiwyg_editor() { | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; // Get post ID | |
if( !isset( $post_id ) ) return; | |
if( $post_id == '17' || $post_id == '33') { // add page ID's | |
remove_post_type_support('page', 'editor'); |
This file contains hidden or 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 | |
/** | |
* This file can be used to validate that the WordPress wp_mail() function is working. | |
* To use, change the email address in $to below, save, and upload to your WP root. | |
* Then browse to the file in your browser. | |
* | |
* For full discussion and instructions, see the associated post here: | |
* http://b.utler.co/9L | |
* | |
* Author: Chad Butler |
This file contains hidden or 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
var $ = jQuery.noConflict(); | |
$(function() { | |
$('a[href*=#]:not([href=#])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); |
This file contains hidden or 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 | |
// Some quick notes about this code: | |
// Keep in mind this is for a 'portfolio' post type. | |
// Also, you'll notice the meta key sometimes has a leading underscore. This is so the meta field and saved data don't appear in the native 'custom fields' fields, just in case you have them supported in your post type args | |
// While it says this should go in functions.php, it should really go in your post type plugin file. In this case it would be the portfolio.php file | |
// Services Provided meta box & wp_editor field | |
function services_provided_meta_box(){ | |
add_meta_box("services-provided-meta-fields", "Services Provided", "services_provided_meta", 'portfolio', "normal", "low"); | |
} |
This file contains hidden or 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
/* | |
* | |
* Add Dropcaps to blog articles | |
* | |
*/ | |
.entry-content p:first-child:first-letter { /* Replace .entry-content class with whatever class you use for blog content p tags */ | |
font-size: 120px; | |
font-family: ProximaNovaBold; | |
padding: 0px; | |
line-height: 52px; |
This file contains hidden or 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
/* | |
* Adds a Featured Post meta box to the post editing screen | |
*/ | |
function blog_featured_meta() { | |
add_meta_box( 'blog_meta', __( 'Featured Posts', 'blog-textdomain' ), 'blog_meta_callback', 'post', 'side', 'high' ); | |
} | |
add_action( 'add_meta_boxes', 'blog_featured_meta' ); | |
/** | |
* Outputs the content of the meta box |
This file contains hidden or 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
/* | |
* | |
* Add Placeholders to Comment Forms | |
* Keep in mind that if you want to kill the labels, the easiest way is use display:none in your stylesheet for the labels | |
* | |
*/ | |
add_filter( 'comment_form_default_fields', 'sabretooth_comment_placeholders' ); | |
function sabretooth_comment_placeholders( $fields ) { | |
$fields['author'] = str_replace( |
NewerOlder