-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
executable file
·72 lines (59 loc) · 1.95 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WP_Bootstrap_Starter
*/
if ( !class_exists( 'WooCommerce' ) ) {
include('install_woocommerce.php');
}
get_header(); ?>
<section id="primary" class="content-area col-sm-12 col-md-12 col-lg-12">
<main id="main" class="site-main" role="main">
<h3 class="center mobile_margin_top">
<?php if (get_theme_mod('homepage_main_heading')): ?>
<?= get_theme_mod('homepage_main_heading') ?>
<?php else: ?>
Templates
<?php endif ?>
</h3>
<hr style="margin:0px;">
<div class="row category_filters">
<?php $categories = getProductCategories(); ?>
<div class="col-sm-12 col-xs-12">
<?php foreach ( $categories as $category): ?>
<div class="col-sm-2" style="float:left">
<a href="<?= get_term_link($category->term_taxonomy_id); ?>">
<?= $category->name ?>
</a>
</div>
<?php endforeach ?>
</div>
</div>
<hr style="margin:0px;">
<?php
$homeProductsPerPage = 8;
$homeColumns = 4;
if (checkFeaturedProductsCount())
$shortCodeTodo = '[featured_products limit="40" columns=”4″ orderby=”date” order=”desc”]';
else
$shortCodeTodo = '[recent_products per_page="' . $homeProductsPerPage . '" columns="' . $homeColumns . '"]';
echo '<div class="dropmock_products">' . do_shortcode($shortCodeTodo) . '</div>';
?>
</main><!-- #main -->
</section><!-- #primary -->
<div class="col-sm-12 center" style="margin-top:4%;">
<a href="<?= get_permalink( wc_get_page_id( 'shop' ) ); ?>" class="center no-decoration">
<i class="fa fa-arrow-right"></i>
Shop All
</a>
</div>
<?php
get_footer();