Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*====================== CSS ==========================*/
- .share-buttons {
- font-size: 2rem;
- line-height: 2rem;
- letter-spacing: 1px;
- text-transform: uppercase;
- margin: 0 0 60px;
- z-index: 2;
- position: relative;
- text-align: center;
- list-style-type: none;
- padding: 0;
- display: flex;
- /* flex-flow: row wrap; */
- /* justify-content: space-between; */
- /* align-content: flex-start; */
- }
- .share-buttons li {
- margin-right: 5px;
- }
- .share-buttons li:last-child {
- margin-right: 0;
- }
- .share-buttons a {
- display: block;
- height: 40px;
- width: 40px;
- line-height: 45px;
- color: #fff;
- font-size: 17px !important;
- }
- .share-vk{
- background: #4c75a3;
- }
- .share-pinterest{
- background: #c8232c;
- }
- .share-linkedin{
- background: #0077b5;
- }
- .share-twitter {
- background: #1da1f2;
- }
- .share-facebook {
- background: #3b5998;
- }
- .share-googleplus {
- background: #db4437;
- }
- .share-pinterest {
- background: #b5071a;
- }
- .single-similar-brand .product-image{
- width: 90px;
- float: left;
- }
- .single-similar-brand .product-detail-inner-new,
- .single-similar-brand .sale-label,
- .single-similar-brand .wcfmmp_sold_by_container{
- display:none !important;
- }
- .single-similar-brand .items{
- clear: both;
- margin-bottom: 15px;
- }
- .single-similar-brand .items .product {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .single-similar-brand .items .product:not(:last-child){
- border-bottom: 1px solid #e1e1e1;
- }
- .single-similar-brand .product-item:hover {
- -webkit-box-shadow: unset !important;
- box-shadow: unset !important;
- }
- .single-similar-brand {
- border: 1px solid #e1e1e1;
- }
- .single-similar-brand h3{
- background-color: #f4f4f4;
- padding-left: 20px;
- padding-right: 15px;
- padding-top: 12px;
- border-bottom: 1px solid #e1e1e1;
- padding-bottom: 12px;
- }
- /*============================ WooCoomm Functions ============================================*/
- <div class="col-md-3 col-sm-3">
- <?php
- if ( is_active_sidebar( 'product-single-sidebar' ) ) : ?>
- <?php dynamic_sidebar( 'product-single-sidebar' ); ?>
- <?php endif; ?>
- <?php global $product; $terms2 = get_the_terms( $product->get_id() , array( 'product_cat') );
- if($terms2){
- foreach( $terms2 as $term1){
- $cat_in_s= $term1->term_id;
- }
- };
- ?>
- <div class="single-similar-brand">
- <h3>Same Brand</h3>
- <?php
- global $product;
- $args = array(
- 'post_type' => 'product',
- 'posts_per_page' => 4,
- 'orderby' => 'date',
- 'order' => 'DESC',
- 'post__not_in' => array($product->get_id()),
- 'tax_query' => array(
- array(
- 'taxonomy' => 'product_cat', // taxonomy name
- 'field' => 'term_id', // term_id, slug or name
- 'terms' => $cat_in_s,
- 'operator' => 'IN', // term id, term slug or term name
- )
- )
- );
- $loop = new WP_Query( $args );
- if ( $loop->have_posts() ) {
- while ( $loop->have_posts() ) : $loop->the_post();
- echo '<div class="items clearfix">';
- wc_get_template_part( 'content', 'product' );
- echo '</div>';
- endwhile;
- } else {
- echo __( 'No products found' );
- }
- wp_reset_postdata();
- ?>
- </div>
- </div>
- /*======================================= Share Template==================================*/
- <ul class="share-buttons">
- <li>
- <a class="share-facebook" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url; ?>" target="_blank">
- <i class="fab fa-facebook-f"></i>
- </a>
- </li>
- <li>
- <a class="share-twitter" href="https://twitter.com/intent/tweet?text=<?php echo $title; ?>&url=<?php echo $url; ?>" target="_blank">
- <i class="fab fa-twitter"></i>
- </a>
- </li>
- <li>
- <a class="share-linkedin" href="https://www.linkedin.com/shareArticle?url=<?php echo $url; ?>" target="_blank">
- <i class="fab fa-linkedin-in"></i>
- </a>
- </li>
- <li>
- <a class="share-vk" href="http://vk.com/share.php?url=<?php echo $url; ?>" target="_blank">
- <i class="fab fa-vk"></i>
- </a>
- </li>
- <li>
- <a class="share-pinterest" href="http://pinterest.com/pin/create/button?media=<?php echo $url; ?>" target="_blank">
- <i class="fab fa-pinterest-p"></i>
- </a>
- </li>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement