Created
May 14, 2019 07:28
-
-
Save akther80/655a4ccd094f00244ee54849208648f0 to your computer and use it in GitHub Desktop.
Techmarket - Store Directory
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
if ( ! function_exists( 'techmarket_store_directory' ) ) { | |
function techmarket_store_directory() { | |
ob_start(); | |
?> | |
<div class="techmarket-store-directory clearfix"> | |
<hr class="no-margin"> | |
<?php the_widget( 'WC_Widget_Product_Categories', array( 'hide_empty' => false ) ); ?> | |
</div> | |
<?php | |
return ob_get_clean(); | |
} | |
} | |
add_shortcode( 'techmarket_store_directory', 'techmarket_store_directory' ); |
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
.techmarket-store-directory .widget_product_categories .product-categories, .techmarket-store-directory .widget_product_categories > ul { | |
border: 0; | |
/* (indentation/2) */ } | |
.techmarket-store-directory .widget_product_categories .product-categories::after, .techmarket-store-directory .widget_product_categories > ul::after { | |
content: ""; | |
display: table; | |
clear: both; } | |
.techmarket-store-directory .widget_product_categories .product-categories > li > a, .techmarket-store-directory .widget_product_categories > ul > li > a { | |
font-weight: 500; } | |
.techmarket-store-directory .widget_product_categories .product-categories > li .children, .techmarket-store-directory .widget_product_categories > ul > li .children { | |
display: block !important; } | |
.techmarket-store-directory .widget_product_categories .product-categories > li .children .no-child, .techmarket-store-directory .widget_product_categories > ul > li .children .no-child { | |
display: none; } | |
.techmarket-store-directory .widget_product_categories .product-categories:not(.product-categories), .techmarket-store-directory .widget_product_categories > ul:not(.product-categories) { | |
float: left; | |
width: 25%; | |
margin: 0; } | |
.techmarket-store-directory .widget_product_categories .product-categories .child-indicator, .techmarket-store-directory .widget_product_categories .product-categories .no-child, .techmarket-store-directory .widget_product_categories > ul .child-indicator, .techmarket-store-directory .widget_product_categories > ul .no-child { | |
display: none; } | |
.techmarket-store-directory .widget_product_categories .product-categories li, .techmarket-store-directory .widget_product_categories > ul li { | |
border: none; } | |
.techmarket-store-directory .widget_product_categories .product-categories, | |
.techmarket-store-directory .widget_product_categories .product-categories ul, .techmarket-store-directory .widget_product_categories > ul, | |
.techmarket-store-directory .widget_product_categories > ul ul { | |
margin: 0 0 0 1em; | |
/* indentation */ | |
padding: 0; | |
list-style: none; | |
color: #369; | |
position: relative; } | |
.techmarket-store-directory .widget_product_categories .product-categories ul, .techmarket-store-directory .widget_product_categories > ul ul { | |
margin-left: .5em; } | |
.techmarket-store-directory .widget_product_categories .product-categories:before, | |
.techmarket-store-directory .widget_product_categories .product-categories ul:before, .techmarket-store-directory .widget_product_categories > ul:before, | |
.techmarket-store-directory .widget_product_categories > ul ul:before { | |
content: ""; | |
display: block; | |
width: 0; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
border-left: 1px solid #ddd; } | |
.techmarket-store-directory .widget_product_categories .product-categories li, .techmarket-store-directory .widget_product_categories > ul li { | |
margin: 0; | |
padding: 0 1.5em; | |
/* indentation + .5em */ | |
line-height: 2em; | |
/* default list item's `line-height` */ | |
position: relative; } | |
.techmarket-store-directory .widget_product_categories .product-categories li:before, .techmarket-store-directory .widget_product_categories > ul li:before { | |
content: ""; | |
display: block; | |
width: 10px; | |
/* same with indentation */ | |
height: 0; | |
border-top: 1px solid #ddd; | |
margin-top: -1px; | |
/* border top width */ | |
position: absolute; | |
top: 1.571em; | |
/* (line-height/2) */ | |
left: 0; } | |
.techmarket-store-directory .widget_product_categories .product-categories li:last-child:before, .techmarket-store-directory .widget_product_categories > ul li:last-child:before { | |
background: white; | |
/* same with body background */ | |
height: auto; | |
top: 1em; | |
/* (line-height/2) */ | |
bottom: 0; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment