style="background:url()" >
remax_store_woocommerce_top_wishlist(); $remax_store_woocommerce->remax_store_woocommerce_header_cart(); endif; ?>
|
/ '; echo '
"; } } } add_action( 'remax_store_breadcrumb', 'remax_store_breadcrumb_section' ); /** * Remax_Store Pagination */ if ( ! function_exists( 'remax_store_number_pagination' ) ) { /** * Remax_Store Pagination * * @since 1.0.0 * @return void */ function remax_store_number_pagination() { global $numpages; $enabled = apply_filters( 'remax_store_pagination_enabled', true ); if ( isset( $numpages ) && $enabled ) { ob_start(); echo "
"; the_posts_pagination( array( 'prev_text' => esc_html__('<', 'remax-store'), 'next_text' => esc_html__('>', 'remax-store'), 'taxonomy' => 'category', 'in_same_term' => true, ) ); echo '
'; $output = ob_get_clean(); echo apply_filters( 'remax_store_pagination_markup', $output ); // WPCS: XSS OK. } } } add_action( 'remax_store_pagination', 'remax_store_number_pagination' ); /*************************************Sidebar****************************** */ /** * Woocommerce Activation * * @return true * @since 1.0.0 */ if ( ! function_exists( 'remax_store_is_woocommerce_activated' ) ) { function remax_store_is_woocommerce_activated() { return class_exists( 'woocommerce' ) ? true : false; } } /** * Get Post Category * */ if( ! function_exists( 'remax_store_get_post_categories' ) ) { /** * Get Post Category * * @return array * @since 1.0.0 */ function remax_store_get_post_categories( ){ $all_categories = get_categories( ); //default value $categories['all'] = 'all'; foreach( $all_categories as $category ){ $categories[$category->term_id] = $category->name; } return $categories; } } /** * Remax_Store before the main content * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'remax_store_before_main_wrapper_main_sec' ) ) { /** * Remax_Store Sidebar layout * * @since 1.0.0 * @return void */ function remax_store_before_main_wrapper_main_sec() { echo '
'; } } add_action( 'remax_store_before_mainsec', 'remax_store_before_main_wrapper_main_sec' ); /** * Remax_Store before the main content * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'remax_store_before_main_wrapper_sec' ) ) { /** * Remax_Store Sidebar layout * * @since 1.0.0 * @return void */ function remax_store_before_main_wrapper_sec() { echo '
'; } } add_action( 'remax_store_after_mainsec', 'remax_store_before_main_wrapper_sec' ); /******************************** Homepage ************************** */ /** * Remax_Store Homepage Slider Section */ if( ! function_exists( 'remax_store_homepage_slider_sec' ) ) { /** * Remax_Store Homepage Slider Section * * @since 1.0.0 * @return catid */ function remax_store_homepage_slider_sec(){ if(!remax_store_is_woocommerce_activated()): return; endif; /** * Get all customizer data * * @param array $homepage_slider_data default slider data. * @param array $homepage_slider_section get the data from customizer section. */ $homepage_slider_data = array( array( 'slider_short_text' => esc_html__('New Arrivals', 'remax-store'), 'slider_text' => esc_html__('Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'remax-store'), 'slider_links' => esc_url('#'), 'slider_btn_text' => esc_html__('Shop Now', 'remax-store'), 'slider_image' => esc_url( REMAX_STORE_THEME_IMG.'countdown.png'), ), ); $homepage_slider_section = get_theme_mod( 'remax_store_homepage_slider_section',$homepage_slider_data ); ?>
$category_id ){ /** * Get all Term data from database by Term field and data. * * @param int $category_id is woocommerce category id * @since 1.0.0 * @return object */ $term = get_term_by( 'id', $category_id, 'product_cat'); /** * Check the ter is null or not * * * @param int $category_id is woocommerce category id * @since 1.0.0 */ if( $term == null ){ $category_id = remax_store_woo_cat_id_by_slug( 'uncategorized' ); $term = get_term_by( 'id', $category_id, 'product_cat'); } /** * Get the Category Images * * @param int $remax_store_thumbnail_id wordpress media thumbnail id * @param $remax_store_category_img_url get the woocommerce category images * @since 1.0.0 */ $remax_store_thumbnail_id = get_woocommerce_term_meta( $category_id, 'thumbnail_id', true ); $remax_store_category_img_url = wp_get_attachment_url( $remax_store_thumbnail_id ); /** * set the default images * * @param $remax_store_category_img_url get the woocommerce category images * @since 1.0.0 */ if( $remax_store_category_img_url == ''){ $remax_store_category_img_url = esc_url( get_template_directory_uri() . '/assets/images/countdown.png' ); } /** * Display the html */ if( $remax_store_homepage_category_count == 1 ){ echo '
'; } /** * category loop class hear * * @param int $remax_store_cat_class category count * @since 1.0.0 */ $remax_store_class_hear =''; if( $remax_store_homepage_category_count == 1 || $remax_store_homepage_category_count == 2 ){ $remax_store_cat_class = 'col-lg-6 col-md-6 col-sm-6 col-xs-12'; }elseif( $remax_store_homepage_category_count == 3 ){ $remax_store_cat_class = 'col-lg-12 col-md-12 col-sm-12 col-xs-12'; }else{ $remax_store_cat_class = ''; $remax_store_class_hear ='th-big-add'; } /** * Category Print value */ echo ''; if( $remax_store_homepage_category_count == 3 ){ echo '
'; } if( $remax_store_homepage_category_count == $remax_store_numberofcat || $remax_store_homepage_category_count == 4 ){ echo "
"; } /** * value increment * * @param int $remax_store_homepage_category_count wordpress media thumbnail id * @since 1.0.0 */ $remax_store_homepage_category_count++; if( $remax_store_homepage_category_count == 5 ){ $remax_store_homepage_category_count = 1; } } ?>

get_name()); ?>

    $remax_store_products_id ){ /** * Get all Term data from database by Term field and data. * * @param int $remax_store_products_id is woocommerce category id * @since 1.0.0 * @return object */ $term = get_term_by( 'id', $remax_store_products_id, 'product_cat'); /** * Check the ter is null or not * * @param int $remax_store_products_id is woocommerce category id * @since 1.0.0 */ if( $term == null ){ $remax_store_products_id = remax_store_woo_cat_id_by_slug('uncategorized'); //set the default term $term = get_term_by( 'id', $remax_store_products_id, 'product_cat'); } ?>
'product', 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => reset( $remax_store_products_tab_section ) // First Element's Value ), array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'exclude-from-catalog', 'operator' => 'NOT IN' ) ), 'posts_per_page' => $remax_store_products_tab_number_of_products ); $query = new WP_Query( $product_args ); if($query->have_posts()) { while($query->have_posts()) { $query->the_post(); echo '
'; echo wc_get_template_part( 'content', 'product' ); echo '
'; } }else{ /** * not have a products then dispaly images * * @since 1.0.0 */ for ($x = 1; $x <= 6; $x++) { echo '
'; remax_store_default_products(); echo '
'; } } wp_reset_postdata(); ?>
'', 'products_woocat' => '', 'products_count' => 3, ); $remax_store_homepage_products_tabs = get_theme_mod('remax_store_homepage_products_tabs',$default); /** * Get all customizer data * * @param array $remax_store_products_section_cat_id single category id * @param array $number_of_products number of products display */ if( array_key_exists($section_id,$remax_store_homepage_products_tabs) ): $remax_store_products_section_cat_id = $remax_store_homepage_products_tabs[$section_id]['products_woocat']; $number_of_products = $remax_store_homepage_products_tabs[$section_id]['products_count']; $remax_store_products_section_title = $remax_store_homepage_products_tabs[$section_id]['section_title']; $remax_store_category_link = get_category_link( $remax_store_products_section_cat_id ); /** * Get woocommerce query * * @param array $remax_store_products_section_cat_id single category id * @param array $number_of_products number of products display * @since 1.0.0 */ $product_args = array( 'post_type' => 'product', 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => intval( $remax_store_products_section_cat_id ) // First Element's Value ), array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'exclude-from-catalog', 'operator' => 'NOT IN' ) ), 'posts_per_page' => intval( $number_of_products ) ); $query = new WP_Query( $product_args ); ?>

have_posts()) { while($query->have_posts()) { $query->the_post(); echo '
'; echo wc_get_template_part( 'content', 'product' ); echo '
'; } }else{ /** * not have a products then dispaly images * * @since 1.0.0 */ for ($x = 1; $x <= 3; $x++) { echo '
'; remax_store_default_products(); echo '
'; } }wp_reset_postdata(); ?>

'; the_post_thumbnail();#Thumbnai Image display echo ''; endif;//End thumbnail Conditions } } //post category section if( ! function_exists( 'remax_store_home_blog_category' ) ) { function remax_store_home_blog_category(){ global $post; // Start category Conditions echo '
'; the_category(); echo '
'; } } //post title section if( ! function_exists( 'remax_store_home_blog_title' ) ) { function remax_store_home_blog_title(){ global $post; // Start category Conditions echo '

'; the_title(); echo '

'; } } //post meta section if( ! function_exists( 'remax_store_home_blog_meta' ) ) { function remax_store_home_blog_meta(){ global $post; // Start meta Conditions echo '
'; remax_store_posted_on(); remax_store_posted_by(); echo '
'; } } /** * Sidebar functions * * @since 1.0.0 * @return string */ if( ! function_exists( 'remax_store_page_layout' ) ) { function remax_store_page_layout(){ /** * get the value form customizer * * @since 1.0.0 * @return string */ return get_theme_mod( 'remax_store_post_sidebar_layout_settings','remax-store-right-sidebar' ); } }