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
// Logos in media settings | |
add_action('admin_init', 'my_media_section'); | |
function my_media_section() { | |
add_settings_section( | |
'theme_logo_settings_section', // Section ID | |
'Theme Logos', // Section Title | |
function(){ | |
echo '<p>Add Logos </p>'; | |
wp_enqueue_media(); | |
}, // Callback |
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 | |
global $wp_query; | |
$maincat = $wp_query->get_queried_object(); | |
$cat_id = $maincat->term_id; | |
$goals = array( | |
'post_type' => 'product', | |
'post_status' => 'publish', | |
'ignore_sticky_posts' => 1, | |
'posts_per_page' => -1, | |
'orderby' => 'menu_order', |
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="cart-wrap"> | |
<?php global $woocommerce; ?> | |
<div class="cart_icon" href="<?php echo $woocommerce->cart->get_cart_url(); ?>"> | |
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
function dw_product_totals() { | |
global $wpdb; | |
$post = get_post( $post_id ); | |
$current_product = get_the_ID($post); | |
$order_items = apply_filters( 'woocommerce_reports_top_earners_order_items', $wpdb->get_results( " |
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
$args = array( | |
'type' => 'product', | |
'parent' => 0, | |
'orderby' => 'name', | |
'hide_empty' => false, | |
'hierarchical' => 1, | |
'exclude' => '', | |
'include' => '', |
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
<!-- search --> | |
<form class="search" method="get" action="<?php echo get_permalink(get_option('woocommerce_shop_page_id')); ?>" role="search"> | |
<input type="hidden" name="ts" value="true" /> | |
<input class="search-input" type="search" name="s" placeholder="<?php _e( 'Search Our Products', 'html5blank' ); ?>" autocomplete="off" data-ajaxurl="<?php echo admin_url('admin-ajax.php'); ?>"> | |
<div class="search-results"></div> | |
<button class="search-submit" type="submit" role="button"><i class="fa fa-search" aria-hidden="true"></i></button> | |
</form> |
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
function dw_product_totals() { | |
global $wpdb; | |
$post = get_post( $post_id ); | |
$current_product = get_the_ID($post); | |
$order_items = apply_filters( 'woocommerce_reports_top_earners_order_items', $wpdb->get_results( " |