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
/** | |
* [WordPress] Template Redirect | |
* Use archive-books.php for Genre taxonomy archives. | |
*/ | |
add_filter( 'template_include', 'sk_template_redirect' ); | |
function sk_template_redirect( $template ) { | |
if ( is_tax( 'sports-book-cat' ) ) | |
$template = get_query_template( 'archive-books' ); | |
return $template; |
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
if( !function_exists('wpex_fix_shortcodes') ) { | |
function wpex_fix_shortcodes($content){ | |
$array = array ( | |
'<p>[' => '[', | |
']</p>' => ']', | |
']<br />' => ']' | |
); | |
$content = strtr($content, $array); | |
return $content; | |
} |
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
.ubermenu-main .ubermenu-item-level-0.ubermenu-has-submenu-drop.ubermenu-active > .ubermenu-target:before{ | |
content: ''; | |
display:block; | |
border:6px solid transparent; | |
border-bottom-color:#fff; | |
position:absolute; | |
bottom:0; | |
left:50%; | |
margin-left:-3px; | |
margin-bottom:-1px; |
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="row"> | |
<div class="archive-header"> | |
<?php | |
//firs argument of the action is WHERE the function hooks into | |
add_action( 'woocommerce_before_main_content', 'woocommerce_category_image', 2 ); | |
function woocommerce_category_image() { | |
if ( is_product_category() ){ | |
global $wp_query; | |
$cat = $wp_query->get_queried_object(); | |
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', 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
//Goes in functions.php | |
// Change number or products per row to 3 | |
add_filter('loop_shop_columns', 'loop_columns'); | |
if (!function_exists('loop_columns')) { | |
function loop_columns() { | |
return 3; // 3 products per row | |
} | |
} |
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: Custom Mini Cart | |
Plugin URI: https://www.zendesignfitm.com/ | |
Description: A widget framework for jewelry dropdown. | |
Version: 1.0 | |
Author: Joey Z | |
Author URI: https://www.zendesignfirm.com/ | |
License: GPL | |
*/ |
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
// This function loads the plugin. | |
function jz_load_plugin() { | |
if (!class_exists('Vintage_Engagement_Widget')) { | |
// load Vintage Engagement Widget if not already loaded | |
include_once(TEMPLATEPATH.'/plugins/vintage_engagement_widget.php'); | |
} | |
if (!class_exists('Jewelry_Widget')) { | |
// load Vintage Engagement Widget if not already loaded | |
include_once(TEMPLATEPATH.'/plugins/jewelry_widget.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
<?php | |
/* | |
Template Name: Events Search Page | |
*/ | |
global $query_string; | |
$query_args = explode("&", $query_string); | |
//this is where you would normally put your $args array | |
$search_query = array(); |
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
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> | |
<div class="row"> | |
<div class="large-12 columns"> | |
<div class="row collapse"> | |
<div class="small-10 columns"> | |
<input type="text" name="s" id="s" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" placeholder="Type event keywords here ..."/> | |
</div> | |
<div class="small-2 columns"> | |
<input type="hidden" name="post_type" value="events" /> | |
<input type="submit" id="searchsubmit" value="Search Events" class="button [secondary success ] postfix"/> |