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 | |
/** | |
* Given a string containing any combination of YouTube and Vimeo video URLs in | |
* a variety of formats (iframe, shortened, etc), each separated by a line break, | |
* parse the video string and determine it's valid embeddable URL for usage in | |
* popular JavaScript lightbox plugins. | |
* | |
* In addition, this handler grabs both the maximize size and thumbnail versions | |
* of video images for your general consumption. In the case of Vimeo, you must | |
* have the ability to make remote calls using file_get_contents(), which may be |
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
// Checks product quantity then removes review tabs if zero | |
add_filter( 'woocommerce_product_tabs', 'zero_tab_remove', 98); | |
function zero_tab_remove($tabs) { | |
if (!$product->get_stock_quantity() == 0) { | |
unset($tabs['reviews']); | |
return $tabs; | |
} | |
} |
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
<div class="image_crop"> | |
<img src="http://kenrockwell.com/nikon/d600/sample-images/600_0985.JPG" /> | |
</div> | |
<style> | |
.image_crop {max-height: 400px; max-width: 400px; overflow: hidden;} | |
.image_crop img {width: 100%; height: auto;} | |
</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
/* | |
These are Raw functions that have helped me when using vimeo. | |
Sample Usage: | |
<?php echo vimeo_id('https://vimeo.com/26434597'); // Will return 26434597 ?> | |
<?php echo vimeo_player('https://vimeo.com/26434597', 'yes'); // Returns the full Vimeo iFrame embed player ?> | |
<?php echo vimeo_thumb('https://vimeo.com/26434597'); // Returns thumbnail URL of the video using the thumbnail_url ?> | |
<?php echo vimeo_duration('https://vimeo.com/26434597'); // Returns the duration of the video in Time format ?> | |
*/ |
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
.home-flexible .five-widgets .widget:first-child { | |
margin-left: 0% !important; | |
} | |
.home-flexible .five-widgets .widget { | |
width: 19.2% !important; | |
} | |
.home-flexible .five-widgets .widget:nth-of-type(3n+1) { | |
clear: none; | |
margin-left: 1%; |
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
// Add these styles to your CSS. | |
<style> | |
.frockina_footer_border { | |
display: block; | |
background: url(/~frockina/wp-content/uploads/2015/06/watercolorbg4-bottom.png) bottom center repeat-x; | |
height: 45px; | |
} | |
</style> | |
// Add this part to your functions.php |
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
/** Replace the standard loop with our custom loop */ | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'child_do_custom_loop' ); | |
function child_do_custom_loop() { | |
global $paged; // current paginated page | |
global $query_args; // grab the current wp_query() args | |
$args = array( | |
'order' => ASC, // exclude posts from this category |
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
// Change Author URL Slug | |
add_filter( 'query_vars', 'wpleet_rewrite_add_var' ); | |
function wpleet_rewrite_add_var( $vars ) | |
{ | |
$vars[] = 'user'; | |
return $vars; | |
} | |
add_rewrite_tag( '%user%', '([^&]+)' ); | |
add_rewrite_rule( |
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
// Media Query Shortcuts // | |
@tablet: ~"only screen and (min-width: 768px)"; | |
@desktop: ~"only screen and (min-width: 992px)"; | |
@large-desktop: ~"only screen and (min-width: 1200px)"; | |
/* Video Area */ | |
#wcc-tour-video { | |
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
<!-- Video Section --> | |
<section id="wcc-tour-video" class="section-video"> | |
<div class="video-container"> | |
<iframe | |
width="1280" | |
height="720" | |
frameborder="0" | |
allowfullscreen | |
src="https://www.youtube.com/embed/NxHzMP58fcM?showinfo=0&rel=0" | |
></iframe> |
OlderNewer