"> <?php /** * determine show feature posts or not. * * @hook backend/majale@show_feature_posts_on */ do_action('show_feature_posts_on'); if (Majale::show_feature_posts()) { /** * @function majale_sticky_post_count get sticky posts count. * @method feature_posts_count get number of feature posts to show. set in admin panel. * @var number */ $majale_sticky_post_count = min(majale_sticky_post_count(), Majale::feature_posts_count()); ?> <?php query_posts(array('post__in' => get_option('sticky_posts'))); ?> <!-- Featured Posts --> <?php if ($majale_sticky_post_count != 0) { ?> <?php if ($majale_sticky_post_count == 1) { ?> <div class="row featured-container sticky"> <?php for ($i = 0; have_posts() && $i < 1; $i++) {
* 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 http://codex.wordpress.org/Template_Hierarchy * */ get_header(); ?> <div class="main-container max-width center-block"> <div class="row blogroll"> <!-- Content --> <div class="<?php echo Majale::grid_number()['blog-area']; ?> blog-area"> <?php if (have_posts()) { // showing category title ?> <section class="blog-post-area"> <header class="article-header"> <div class="date-author"></div> <h2 class="blog-post-title padding-15"> <i class="fa fa-folder"></i> <?php printf(__('Category Archives: %s', 'majale'), single_cat_title('', false)); ?> </h2>
<?php // Store loop count we're currently on if (empty($woocommerce_loop['loop'])) { $woocommerce_loop['loop'] = 0; } // Store column count for displaying the grid if (empty($woocommerce_loop['columns'])) { $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', 4); } // Increase loop count $woocommerce_loop['loop']++; ?> <div class="shop-area <?php echo Majale::shop_prooducts_per_row(); ?> "> <?php do_action('woocommerce_before_subcategory', $category); ?> <a href="<?php echo get_term_link($category->slug, 'product_cat'); ?> "> <?php /** * woocommerce_before_subcategory_title hook
function majale_date_author() { global $majale; global $post; // if it set to hide meta data of the page if (get_post_meta($post->ID, 'majale_one_page_meta', true) == 'hide') { return; } // read option an make date according to the option if (isset($majale['time_format'])) { if ($majale['time_format'] == 1) { $majale_date = ""; } elseif ($majale['time_format'] == 2) { $majale_date = get_the_date(get_option('date_format')); } else { $majale_date = Majale::human_time_diff(); } } // if the date is disable make the time permalink if (empty($majale_date)) { ?> <a rel="bookmark" href="<?php echo esc_url(get_permalink()); ?> "> <span class="date padding-15"><i class="fa fa-link"></i> <?php _e('Permalink', 'majale'); ?> </span> </a> <?php } else { ?> <a rel="bookmark" href="<?php echo esc_url(get_permalink()); ?> "> <span class="date padding-15"><i class="fa fa-clock-o"></i> <?php echo $majale_date; ?> </span> </a> <?php } ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "> <span class="author padding-15"><i class="fa fa-user"></i> <?php _e('By', 'majale'); ?> <?php echo get_the_author(); ?> </span> </a> <?php }
if (isset($_GET['ajax']) && $_GET['ajax']) { while (have_posts()) { the_post(); wc_get_template_part('content', 'single-product'); } // end of the loop. } else { get_header('shop'); ?> <div class="main-container max-width center-block"> <div class="row shop-page single-product-page"> <div class="shop-area <?php echo Majale::shop_single_grid_number()['shop-single-area']; ?> "> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action('woocommerce_before_main_content'); ?> <?php while (have_posts()) {
?> <?php dynamic_sidebar('sidebar-2'); ?> <?php } ?> </div> <?php } } else { ?> <div id="sidebar-2" class="<?php echo Majale::grid_number()['sidebar-2']; ?> sidebar-2" role="complementary"> <?php if (is_active_sidebar('sidebar-2')) { ?> <?php dynamic_sidebar('sidebar-2'); ?> <?php } ?> </div> <?php }
// Store loop count we're currently on if (empty($woocommerce_loop['loop'])) { $woocommerce_loop['loop'] = 0; } // Store column count for displaying the grid if (empty($woocommerce_loop['columns'])) { $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', 4); } // Ensure visibility if (!$product || !$product->is_visible()) { return; } // Increase loop count $woocommerce_loop['loop']++; // Extra post classes $classes = array('product', Majale::shop_prooducts_per_row()); if (0 == ($woocommerce_loop['loop'] - 1) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns']) { $classes[] = 'first'; } if (0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns']) { $classes[] = 'last'; } ?> <div <?php post_class($classes); ?> > <div class="product-container"> <?php
} ?> </div> <div class="col-md-3 col-sm-6 col-xs-12"> <?php if (is_active_sidebar('footer-4')) { ?> <?php dynamic_sidebar('footer-4'); ?> <?php } ?> </div> </footer> </section> <section class="footer-info"> <footer class="main-container max-width center-block"> <p class="text-center"><?php Majale::show_footer_text(); ?> </p> </footer> </section> <?php wp_footer(); ?> </body> </html>
* @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } get_header('shop'); ?> <div class="main-container max-width center-block"> <div class="row shop-page"> <div class="shop-area <?php echo Majale::shop_grid_number()['shop-area']; ?> "> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action('woocommerce_before_main_content'); ?> <div class="shop-page-title">