Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php global $current_user;
- get_currentuserinfo(); ?>
- <!-- Grid Logged In -->
- <section class="grid-section">
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <div class="grid">
- <?php
- $taxonomy = 'product_cat';
- // $orderby = 'name';
- $show_count = 0; // 1 for yes, 0 for no
- $pad_counts = 0; // 1 for yes, 0 for no
- $hierarchical = 1; // 1 for yes, 0 for no
- $title = '';
- $empty = 0;
- $args = array(
- 'taxonomy' => $taxonomy,
- 'orderby' => $orderby,
- 'show_count' => $show_count,
- 'pad_counts' => $pad_counts,
- 'hierarchical' => $hierarchical,
- 'title_li' => $title,
- 'hide_empty' => $empty,
- 'meta_query' => array(
- array(
- 'key' => 'feature',
- 'compare' => '==',
- 'value' => '1'
- )
- )
- );
- $all_categories = get_categories( $args ); ?>
- <?php foreach ($all_categories as $cat) : ?>
- <?php if ($cat->category_parent == 0) : ?>
- <?php $category_id = $cat->term_id; ?>
- <?php $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); ?>
- <?php $image = wp_get_attachment_url( $thumbnail_id ); ?>
- <?php $gradient = get_field('gradient', $cat); ?>
- <!-- Boxes -->
- <a href="<?php echo get_term_link($cat->slug, 'product_cat'); ?>">
- <?php if ($image) : ?>
- <div class="grid-item" style="background-image: url('<?php echo $image; ?>');" >
- <?php else: ?>
- <div class="grid-item <?php echo $gradient; ?>">
- <?php endif; ?>
- <div class="box-wrap">
- <div class="box-title">
- <h4><?php echo $cat->name; ?></h4>
- </div>
- </div>
- </div>
- </a>
- <!-- Boxes -->
- <?php endif; ?>
- <?php endforeach; ?>
- <div class="stamp stamp1 pink-gradient">
- xx
- </div>
- <div class="grid-item pink-gradient">
- <div class="box-wrap">
- <div class="box-title">
- <h4>Send us your ideas</h4>
- </div>
- </div>
- </div>
- <div class="grid-item social">
- </div>
- <div class="grid-item welcome">
- <div class="welcome-inner">
- <div class="greeting">
- Hi, <?php echo $current_user->user_login; ?> <img src="<?php echo get_template_directory_uri(); ?>/images/smile.png" class="img-responsive" alt="Account Icon"/>
- </div>
- <div class="date">
- <?php the_time('F j') ?>
- </div>
- <div class="time">
- 08:45
- </div>
- </div>
- </div>
- <div class="grid-item astra">
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- Grid -->
- <script>
- jQuery(document).ready(function( $ ) {
- var $grid=$('.grid').isotope({
- layoutMode: 'packery',
- itemSelector: '.grid-item'
- // stamp: '.stamp'
- });
- // Add Placeholders to Custom Wordpress Login Form
- $('#user_login').attr( 'placeholder', 'Username' );
- $('#user_pass').attr( 'placeholder', 'Password' );
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement