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 | |
namespace Webikon; | |
/** | |
* Class AssetResolver | |
* | |
* This utility class resolves URIs to built assets in the /dist directory of our theme. Built assets have a version | |
* hash within their file name – each time the file changes, this hash will change which changes the file name. | |
* |
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
# Rewrite images, add into server/images-rewrite.conf | |
location ~ ^/wp-content/uploads/(.*) { | |
if (!-e $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ https://PRODUCTIONSITE.COM/wp-content/uploads/$1 redirect; | |
} | |
} |
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
# Remove all comments | |
TRUNCATE `wp_commentmeta`; | |
TRUNCATE `wp_comments` | |
# We also need to remove comments counts, which are set in postmeta table | |
# Get count which are out of sync | |
SELECT wpp.id, wpp.post_title, wpp.comment_count, wpc.cnt | |
FROM wp_posts wpp | |
LEFT JOIN |
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 | |
// Returns array with repeater subfields and its values | |
function repeater_get_post_meta( $repeater_key, $post_id, $sub_field_keys ) { | |
if ( ! $post_id ) { | |
$post_id = get_the_ID(); | |
} | |
// get repeater field | |
$repeater = get_post_meta( get_the_ID(), $repeater_key, true ); |
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
/** | |
* Be sure to include library scripts in this order. Can be placed either | |
* in the header or footer. | |
*/ | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script> |
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
@mixin for-size($range) { | |
$phone-upper-boundary: 600px; | |
$tablet-portrait-upper-boundary: 900px; | |
$tablet-landscape-upper-boundary: 1200px; | |
$desktop-upper-boundary: 1800px; | |
@if $range == phone-only { | |
@media (max-width: #{$phone-upper-boundary - 1}) { @content; } | |
} @else if $range == tablet-portrait-up { |
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
// First, register your taxonomy and set the slug argument of rewrite to shows: | |
register_taxonomy( | |
'show_category', | |
'show', | |
array( | |
'rewrite' => array( 'slug' => 'shows', 'with_front' => false ), | |
// your other args... | |
) | |
); |
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
$meta_query = array( | |
'relation' => 'OR', | |
'featured' => array( // give the first meta key array an array key | |
'key' => 'is_featured', | |
'compare' => 'EXISTS', | |
'type' => 'NUMERIC' | |
), | |
'delivery_date' => array( // give the second meta key array an array key | |
'key' => 'to_be_delivered', | |
'compare' => 'EXISTS', |
NewerOlder