'', 'link_before' => '', 'link_after' => '', ) ); } add_action( 'ascend_page_content', 'ascend_page_content_wrap_before', 10 ); function ascend_page_content_wrap_before() { echo '
'; } add_action( 'ascend_page_content', 'ascend_page_content', 20 ); function ascend_page_content() { get_template_part( 'templates/content', 'page' ); } add_action( 'ascend_page_content', 'ascend_page_content_wrap_after', 30 ); function ascend_page_content_wrap_after() { echo '
'; } add_action( 'ascend_page_footer', 'ascend_page_comments', 20 ); function ascend_page_comments() { comments_template( '/templates/comments.php' ); } add_action( 'ascend_page_title_container', 'ascend_page_title', 20 ); function ascend_page_title() { if ( ascend_display_pagetitle() ) { get_template_part( 'templates/page', 'header' ); } else { if ( ascend_display_page_breadcrumbs() ) { echo '
'; ascend_breadcrumbs(); echo '
'; } } } add_action( 'ascend_front_page_title_container', 'ascend_front_page_header', 20 ); function ascend_front_page_header() { $ascend = ascend_get_options(); if ( isset( $ascend['mobile_switch'] ) && $ascend['mobile_switch'] == 1 ) { if ( isset( $ascend['home_mobile_header'] ) ) { $m_home_header = $ascend['home_mobile_header']; } else { $m_home_header = 'none'; } if ( $m_home_header == 'basic' ) { get_template_part( 'templates/mobile_home/mobile', 'basic-slider' ); } else if ( $m_home_header == 'pagetitle' ) { get_template_part( 'templates/mobile_home/mobile', 'page-header' ); } } if ( isset( $ascend['home_header'] ) ) { $home_header = $ascend['home_header']; } else { $home_header = 'pagetitle'; } if ( $home_header == 'basic' ) { get_template_part( 'templates/home/basic', 'slider' ); } else if ( $home_header == 'basic_post_carousel' ) { get_template_part( 'templates/home/post', 'carousel' ); } else if ( $home_header == 'pagetitle' ) { get_template_part( 'templates/home/home', 'page-header' ); } } if ( ! function_exists( 'ascend_icon_menu_output' ) ) { function ascend_icon_menu_output( $icon = 'kt-icon-cogs', $imageid = null, $link = null, $target = null, $title = null, $description = null, $readmore = null, $iconcolor = null, $iconbackground = null, $iconborder = null, $iconsize = null, $textcolor = null, $highlight = null ) { if ( ! empty( $target ) ) { $target = $target; } else { $target = '_self'; } if ( ! empty( $iconbackground ) ) { $iconbackground = 'background-color:' . $iconbackground; } else { $iconbackground = ''; } if ( ! empty( $iconsize ) ) { $iconsize = 'font-size:' . $iconsize . 'px'; } else { $iconsize = ''; } if ( ! empty( $iconcolor ) ) { $iconcolor = 'color:' . $iconcolor; } else { $iconcolor = ''; } if ( ! empty( $iconborder ) ) { $iconborder = 'border-color:' . $iconborder; } else { $iconborder = ''; } if ( ! empty( $textcolor ) ) { $textcolor = 'color:' . $textcolor; } else { $textcolor = ''; } if ( ! empty( $highlight ) ) { $highlight_border = 'border-color:' . $highlight; $highlight_bg = 'background-color:' . $highlight; } else { $highlight_border = ''; $highlight_bg = ''; } if ( ! empty( $icon ) ) { $icon = $icon; } else { $icon = 'kt-icon-cogs'; } if ( ! empty( $link ) ) { echo ''; } else { echo '
'; } echo '
'; echo ''; echo ''; if ( ! empty( $imageid ) ) { echo wp_get_attachment_image( $imageid, 'full' ); } else { echo ''; } echo '
'; if ( ! empty( $title ) ) { echo '

' . esc_html( $title ) . '

'; } if ( ! empty( $description ) ) { echo ''; } if ( ! empty( $readmore ) ) { echo ''; } if ( ! empty( $link ) ) { echo '
'; } else { echo '
'; } } } if ( ! function_exists( 'ascend_build_image_menu' ) ) { function ascend_build_image_menu( $imageid = null, $type = 'fixed_height', $height = '220', $link = null, $target = '_self', $title = null, $subtitle = null, $align = 'left', $valign = 'center', $class = null ) { if ( empty( $imageid ) ) { return; } ob_start(); if ( $type == 'image_height' ) { $csstype = 'image-menu-image-size'; } else { $csstype = 'image-menu-fixed-height'; } $image = wp_get_attachment_image_src( $imageid, 'full' ); $alt = get_post_meta( $imageid, '_wp_attachment_image_alt', true ); ?>
'; } else { echo ''; } ?>
'true', 'showexcerpt' => 'false', 'showtypes' => 'true', 'columns' => $columns, 'ratio' => 'square', 'style' => 'pgrid', 'carousel' => 'true', 'tileheight' => '', ); if ( empty( $orderby ) ) { $orderby = 'menu_order'; } if ( empty( $order ) ) { $order = 'ASC'; } } elseif ( $type == 'product' ) { global $woocommerce_loop; $margin = 'row-margin-small'; if ( empty( $orderby ) ) { $orderby = 'menu_order'; } if ( empty( $order ) ) { $order = 'ASC'; } if ( $columns == 1 ) { $woocommerce_loop['columns'] = 3; } else { $woocommerce_loop['columns'] = $columns; } if ( $productargs == 'featured' ) { if ( version_compare( WC_VERSION, '3.0', '>' ) ) { $meta_query = WC()->query->get_meta_query(); $tax_query = WC()->query->get_tax_query(); $tax_query[] = array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'featured', 'operator' => 'IN', ); $extraargs = array( 'meta_query' => $meta_query, 'tax_query' => $tax_query, ); } else { $meta_query = WC()->query->get_meta_query(); $meta_query[] = array( 'key' => '_featured', 'value' => 'yes', ); $extraargs = array( 'meta_query' => $meta_query, ); } } else if ( 'best' === $productargs || 'best-products' === $productargs ) { $extraargs = array( 'meta_key' => 'total_sales', 'orderby' => 'meta_value_num', 'order' => 'DESC', ); } else if ( 'sale' === $productargs ) { if ( class_exists( 'woocommerce' ) ) { $extraargs = array( 'meta_query' => WC()->query->get_meta_query(), 'post__in' => array_merge( array( 0 ), wc_get_product_ids_on_sale() ), 'tax_query' => WC()->query->get_tax_query(), ); } } else if ( $productargs == 'latest' ) { $extraargs = array( 'orderby' => 'date', 'order' => 'DESC', ); } $tax = 'product_cat'; } else if ( $type == 'staff' ) { $margin = 'rowtight'; $tax = 'staff-group'; if ( empty( $orderby ) ) { $orderby = 'menu_order'; } if ( empty( $order ) ) { $order = 'ASC'; } } else if ( $type == 'testimonal' ) { $margin = 'rowtight'; $tax = 'testimonal-group'; if ( empty( $orderby ) ) { $orderby = 'menu_order'; } if ( empty( $order ) ) { $order = 'ASC'; } } else { $post_type = 'post'; global $ascend_grid_columns, $ascend_grid_carousel; $ascend_grid_columns = $columns; $ascend_grid_carousel = true; $margin = 'rowtight'; $tax = 'category'; if ( empty( $orderby ) ) { $orderby = 'date'; } if ( empty( $order ) ) { $order = 'DESC'; } if ( $ascend_grid_columns == '2' ) { $itemsize = 'col-xxl-4 col-xl-6 col-md-6 col-sm-6 col-xs-12 col-ss-12'; } else if ( $ascend_grid_columns == '3' ) { $itemsize = 'col-xxl-3 col-xl-4 col-md-4 col-sm-4 col-xs-6 col-ss-12'; } else { $itemsize = 'col-xxl-25 col-xl-3 col-md-3 col-sm-4 col-xs-6 col-ss-12'; } } $args = array( 'orderby' => $orderby, 'order' => $order, 'post_type' => $post_type, 'offset' => $offset, 'post_status' => 'publish', 'posts_per_page' => $items, ); $args = array_merge( $args, $extraargs ); if ( ! empty( $cat ) ) { if ( 'product' == $post_type ) { if ( empty( $args['tax_query'] ) ) { $args['tax_query'] = array(); } $args['tax_query'][] = array( array( 'taxonomy' => $tax, 'terms' => array_map( 'sanitize_title', explode( ',', $cat ) ), 'field' => 'slug', ), ); } else { $ccat = array( $tax => $cat ); $args = array_merge( $args, $ccat ); } } echo ' '; } } /** * Page Navigation */ function ascend_pagination() { $args['mid_size'] = 3; $args['end_size'] = 1; $args['prev_text'] = ''; $args['next_text'] = ''; echo '
'; the_posts_pagination( $args ); echo '
'; } add_action( 'ascend_pagination', 'ascend_pagination', 10 );