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 | |
| $woo_options = get_option( 'woo_options' ); | |
| /*------------------------------------------------------------------------------------ | |
| TABLE OF CONTENTS | |
| - Theme Setup | |
| - Woo Conditionals | |
| - Add Google Maps to HEAD |
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
| // Available Google webfont names | |
| $google_fonts = array( | |
| array( 'name' => "ABeeZee", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Abel", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Abril Fatface", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Aclonica", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Acme", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Actor", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Adamina", 'variant' => ':300,300italic,400,400italic,700,700italic'), | |
| array( 'name' => "Advent Pro", 'variant' => ':300,300italic,400,400italic,700,700italic'), |
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_action( 'after_setup_theme', 'custom_remove_feed' ); | |
| if ( ! function_exists( 'custom_remove_feed' ) ) { | |
| function custom_remove_feed () { | |
| // Remove default posts and comments RSS feed links to head | |
| remove_theme_support( 'automatic-feed-links' ); | |
| } | |
| } |
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 layout to body_class output */ | |
| /*-----------------------------------------------------------------------------------*/ | |
| if ( ! function_exists( 'woo_layout_body_class' ) ) { | |
| function woo_layout_body_class( $classes ) { | |
| global $post, $wp_query, $woo_options; | |
| $layout = ''; | |
| // Single post layout | |
| if ( is_singular() ) { |
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 to optionally remove responsive design and load in fallback CSS styling. */ | |
| /*-----------------------------------------------------------------------------------*/ | |
| if ( ! function_exists( 'woo_remove_responsive_design' ) ) { | |
| /** | |
| * Trigger items for removing responsive design from Canvas. | |
| * @since 5.0.13 | |
| * @return void | |
| */ |
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
| /* | |
| WOO CUSTOM STYLESHEET | |
| --------------------- | |
| Instructions: | |
| Add your custom styles in this file instead of style.css so it | |
| is easier to update the theme. Simply copy an existing style | |
| from style.css to this file, and modify it to your liking. */ |
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
| /*-----------------------------------------------------------------------------------*/ | |
| /* Single Post Author */ | |
| /*-----------------------------------------------------------------------------------*/ | |
| if ( ! function_exists( 'woo_author_box' ) ) { | |
| function woo_author_box () { | |
| global $post; | |
| $author_id=$post->post_author; | |
| ?> | |
| <aside id="post-author"> | |
| <div class="profile-image"><?php echo get_avatar( $author_id, '80' ); ?></div> |
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_action( 'woo_head', 'custom_more', 10 ); | |
| function custom_more() { | |
| if ( is_page_template( 'template-news.php' ) ) { | |
| add_action( 'woo_post_inside_after', 'woo_post_more' ); | |
| } | |
| } |
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
| $args = array( 'post_type' => 'product', | |
| 'posts_per_page' => 100, | |
| 'meta_query' => array( 'key' => '_visibility', | |
| 'value' => array('catalog', 'visible'), | |
| 'compare' => 'IN' | |
| ) | |
| ); | |
| $loop = new WP_Query( $args ); | |
| while ( $loop->have_posts() ) : $loop->the_post(); |
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 custom_ad_header () { | |
| ?> | |
| <div style="float:left;"><?php echo adrotate_group(4); ?></div> | |
| <?php | |
| } | |
| add_action( 'woo_header_inside', 'custom_ad_header', 1 ); |