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
| {parse addtohead="<meta name='robots' content='noindex' />", type="raw"} |
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_filter('woocommerce_cross_sells_total', 'cartCrossSellTotal'); | |
| function cartCrossSellTotal($total) { | |
| $total = '3'; | |
| return $total; | |
| } |
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
| // Change the WooThemes stripe plugin icon | |
| add_filter('wc_stripe_icon', 'custom_woocommerce_paypal_icon'); | |
| function custom_woocommerce_paypal_icon( $url ) { | |
| $url = get_bloginfo('template_url')."/assets/img/payment-icons.png"; | |
| return $url; | |
| } |
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
| $total_products = count( get_posts( array('post_type' => 'product', 'post_status' => 'publish', 'fields' => 'ids', 'posts_per_page' => '-1') ) );; |
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
| function totalCustomers() { | |
| global $wpdb; | |
| $result = $wpdb->get_row(" | |
| SELECT SUM(pm.meta_value) AS total_sales | |
| FROM $wpdb->posts AS p | |
| LEFT JOIN $wpdb->postmeta AS pm ON (p.ID = pm.post_id AND pm.meta_key = 'total_sales') | |
| WHERE p.post_type = 'product' | |
| "); |
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
| function totalTickets() { | |
| global $wpdb; | |
| $wpdb->set_blog_id(2); | |
| $wpdb->set_prefix($wpdb->base_prefix); | |
| $countTickets = count( get_posts( array('post_type'=>'ticket','nopaging' => true))); | |
| $wpdb->set_blog_id(1); |
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
| $(window).load(function(){ | |
| $('.lazyload').each(function() { | |
| var lazy = $(this); | |
| var src = lazy.attr('data-src'); | |
| lazy.css('background-image', 'url("'+src+'")'); | |
| }); | |
| }); |
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 cookieExpiry = new Date(new Date().getTime() + 365 * 86400000); // 1 year from now | |
| $.setCookie('Name','Value',cookieExpiry); | |
| $.getCookie('Name'); |
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 echo get_the_term_list( get_the_ID(), 'download_tag', 'Tags: ', ', ', '') ?> |
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
| <!-- :: Xenthemes Message :: --> | |
| <xen:if is="{$contentTemplate} == 'forum_list'"> | |
| <xen:if is="!{$visitor.user_id} && @xt_message_guest == 1"> | |
| <xen:include template="xt_message_guest" /> | |
| </xen:if> | |
| <xen:if is="{$visitor.user_id} && @xt_message_member == 1"> | |
| <xen:include template="xt_message_member" /> | |
| </xen:if> | |
| </xen:if> |