Skip to content

Instantly share code, notes, and snippets.

@pattyok
pattyok / acf-flexible-to-relevanssi.php
Created November 16, 2018 19:37
ACF Flexible Field Content in Relevanssi
<?php
//ADD Flexible content to Relevanssi
add_filter('relevanssi_excerpt_content', __NAMESPACE__ . '\\custom_fields_to_excerpts', 10, 3);
function custom_fields_to_excerpts($content, $post, $query) {
$sections = get_field('sections', $post->ID);
if ($sections) {
foreach ($sections as $section) {
if ($section['acf_fc_layout'] == 'content_editor') {
<?php
//Add these things to setup.php
//Add image sizes
add_image_size( 'facebook', 1230, 630, array('center', 'center') );
add_image_size( 'x-large', 1800, 1200, array('center', 'center') );
add_image_size( 'med-large', 600, 400, array('center', 'center') );
update_option( 'medium_size_w', 400 );
update_option( 'medium_size_h', 400 );
@pattyok
pattyok / Image Rendering
Last active June 15, 2017 20:22
Use this when you have to use an image with text to keep it from being fuzzy.
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast;/* Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.0 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@pattyok
pattyok / dabblet.css
Created December 20, 2012 19:32
Untitled
; /**
* Christmas
*/
body{
background: #fff;
background: linear-gradient(180deg, #fff, #78C2C2);
min-height: 300px;
}
.snowball {
border-radius:50%;