This commit is contained in:
nguyen dung
2022-02-18 16:43:41 +07:00
commit 39b8cb3612
4470 changed files with 1378320 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<?php if ( $template !== 'flatsome' ) : ?>
<div class="notice notice-warning notice-alt inline" style="display:block!important;margin-bottom:15px!important">
<p>
<?php /* translators: 1. Template */ ?>
<?php echo sprintf( __( 'An unusual theme directory name was detected: <em>%s</em>. The Flatsome parent theme should be installed in a directory named <em>flatsome</em> to ensure updates are handled correctly.', 'flatsome' ), $template ); ?>
</p>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,126 @@
<?php if ( $args['form'] ) : ?>
<form action="<?php echo admin_url( 'admin-post.php' ); ?>" method="POST" autocomplete="off" onsubmit="return onFlatsomeRegisterForm(this);">
<?php endif; ?>
<?php if ( $error ) : ?>
<div class="notice notice-<?php echo is_string( $error->get_error_code() ) ? 'warning' : 'error'; ?> notice-alt inline" style="display:block!important">
<?php echo wpautop( $error->get_error_message() ); ?>
</div>
<?php elseif ( ! empty( $issues ) ) : ?>
<div class="notice notice-warning notice-alt inline" style="display:block!important">
<?php foreach ( $issues as $issue ) : ?>
<?php echo wpautop( $issue ); ?>
<?php endforeach; ?>
</div>
<?php elseif ( $registration->is_registered() && $registration->is_verified() && $code ) : ?>
<div class="notice notice-success notice-alt inline" style="display:block!important;margin-bottom:15px!important">
<p><?php _e( 'Your site is <strong>registered</strong>. Thank you! Enjoy Flatsome and one-click updates.', 'flatsome' ); ?></p>
</div>
<?php endif; ?>
<?php wp_nonce_field( 'flatsome_envato_register', 'flatsome_envato_register_nonce' ); ?>
<input type="hidden" name="action" value="flatsome_envato_register" />
<div class="flatsome-registration-form">
<?php if ( is_a( $registration, 'Flatsome_Envato_Registration' ) ) : ?>
<div class="wp-clearfix">
<div class="flatsome-token-migrator__errors"></div>
<div class="notice notice-info notice-alt inline" style="display:block!important;margin-bottom:15px!important">
<p><?php _e( 'Your copy of Flatsome is registered with a personal Envato token. Please register Flatsome with a purchase code instead to ensure your site receives updates in the future.', 'flatsome' ); ?></p>
<p><?php _e( 'The selector below will show available purchase codes you can register with.', 'flatsome' ); ?></p>
<div class="flatsome-token-migrator__selector" style="display:flex;max-width:500px;margin-bottom:16px;">
<select name="flatsome_purchase_id" class="flatsome-token-migrator__select" style="width:100%;max-width:none;padding:10px 16px;font-size:16px;">
<option value="" disabled selected><?php esc_html_e( 'Select a purchase code:', 'flatsome' ); ?></option>
</select>
<span class="spinner"></span>
</div>
</div>
</div>
<?php endif; ?>
<p class="flatsome-registration-form__code">
<?php if ( $registration->get_code() ) : ?>
<input type="text" value="<?php echo esc_attr( $code ); ?>" class="code" style="width:100%;padding:10px 16px;" readonly>
<?php else : ?>
<input type="text" id="flatsome_purchase_code" name="flatsome_purchase_code" value="<?php echo esc_attr( $code ); ?>" class="code" placeholder="Purchase code (e.g. 123e4567-e89b-12d3-a456-426614174000)" style="width:100%;padding:10px 16px;">
<?php endif; ?>
</p>
<?php if ( empty( $issues ) && $registration->get_option( 'domain' ) ) : ?>
<p>
<?php esc_html_e( 'Registered domain:', 'flatsome' ); ?>
<b><?php echo esc_html( $registration->get_option( 'domain' ) ); ?></b>
<?php if ( ! $registration->is_public() ) : ?>
<code><?php echo esc_html( strtolower( $registration->get_option( 'type' ) ) ); ?></code>
<?php endif; ?>
</p>
<?php endif; ?>
<?php if ( $args['show_terms'] ) : ?>
<p>
<?php if ( $registration->get_code() ) : ?>
<input type="hidden" name="flatsome_envato_terms" value="1" />
<input type="checkbox" checked readonly onclick="return false;">
<?php else : ?>
<input type="checkbox" <?php checked( $confirmed ); ?> id="flatsome_envato_terms" name="flatsome_envato_terms">
<?php endif; ?>
<label for="flatsome_envato_terms" style="display: inline-block;vertical-align: top;width: 90%;margin-top: 2px;font-size: 14px">
Confirm that, according to the Envato License Terms, each license entitles one person for a single project.
Creating multiple unregistered installations is a copyright violation.
<a href="https://themeforest.net/licenses/standard" target="_blank" rel="noopener noreferrer">More info</a>.
</label>
</p>
<?php endif; ?>
<?php if ( $args['form'] && $args['show_submit'] ) : ?>
<p>
<?php if ( $registration->get_code() ) : ?>
<?php if ( ! empty( $issues ) ) : ?>
<input name="flatsome_verify" type="submit" class="button button-large button-primary" value="Re-register"/>
<input name="flatsome_unregister" onclick="return onFlatsomeUnregister()" type="submit" class="button button-large button-secondary" value="Unregister"/>
<?php elseif ( ! $registration->is_verified() ) : ?>
<input name="flatsome_verify" type="submit" class="button button-large button-primary" value="Verify purchase code"/>
<input name="flatsome_unregister" onclick="return onFlatsomeUnregister()" type="submit" class="button button-large button-secondary" value="Unregister"/>
<?php elseif ( $code ) : ?>
<input name="flatsome_unregister" onclick="return onFlatsomeUnregister()" type="submit" class="button button-large button-primary" value="Unregister"/>
<?php else : ?>
<input name="flatsome_register" type="submit" class="button button-large button-primary" value="Register"/>
<?php endif; ?>
<?php else : ?>
<input name="flatsome_register" type="submit" class="button button-large button-primary" value="Register"/>
<?php endif; ?>
<?php if ( is_a( $registration, 'Flatsome_Envato_Registration' ) ) : ?>
<input name="flatsome_unregister" onclick="return onFlatsomeUnregister()" type="submit" class="button button-large button-secondary" value="Unregister token"/>
<?php endif; ?>
<a class="button button-large" href="<?php echo esc_url_raw( UXTHEMES_ACCOUNT_URL ); ?>" target="_blank" rel="noopener noreferrer">
<?php esc_html_e( 'Manage your licenses', 'flatsome' ); ?>
<span style="font-size:16px;width:auto;height:auto;vertical-align:middle;" class="dashicons dashicons-external"></span>
</a>
</p>
<?php endif; ?>
</div>
<?php if ( $args['form'] ) : ?>
</form>
<?php endif; ?>
<small style="padding-top: 10px; margin-top: 15px; opacity: .8; display: block; border-top: 1px solid #eee;">A purchase code (license) is only valid for <strong>One Domain</strong>. Are you using this theme on a new domain? Purchase a <a href="//bit.ly/buy-flatsome" target="_blank">new license here</a> to get a new purchase code.</small>
<script type="text/javascript">
function onFlatsomeUnregister() {
if (!confirm("<?php echo wp_slash( __( 'Are you sure you want to unregister Flatsome?', 'flatsome' ) ) ?>")) {
return false;
}
}
function onFlatsomeRegisterForm(form){
<?php if ( ! $registration->is_registered() ) : ?>
if (!form.flatsome_envato_terms.checked) {
form.flatsome_envato_terms.parentNode.style.color = "#dc3232";
return false;
}
<?php endif; ?>
return true;
}
</script>

View File

@@ -0,0 +1,15 @@
<?php iframe_header(); ?>
<div id="wpwrap" class="flatsome-panel" style="text-align:center;">
<a href="https://themeforest.net/item/flatsome-multipurpose-responsive-woocommerce-theme/5484319#item-description__change-log" style="display:inline-block;" target="_blank" rel="noopener noreferrer">
<div class="wp-badge fl-badge">
<?php /* translators: 1: Version. */ ?>
<?php echo sprintf( __( 'Version %s', 'flatsome' ), $version ); ?>
</div>
<div style="margin-top:8px;">
<?php echo __( 'Read change log here', 'flatsome' ); ?>
</div>
</a>
</div>
<?php iframe_footer(); ?>

View File

@@ -0,0 +1,15 @@
<?php
$classes = array( 'back-to-top', 'button', 'icon', 'invert', 'plain', 'fixed', 'bottom', 'z-1', 'is-outline', 'round' );
$classes[] = get_theme_mod( 'back_to_top_position' ) === 'left' ? 'left' : '';
$classes[] = get_theme_mod( 'back_to_top_mobile' ) ? '' : 'hide-for-medium';
$shape = get_theme_mod( 'back_to_top_shape', 'circle' );
if ( $shape === 'circle' ) {
$classes[] = 'circle';
$classes = array_diff( $classes, array( 'round' ) );
}
$classes = implode( ' ', array_filter( $classes ) );
?>
<a href="#top" class="<?php echo $classes; ?>" id="top-link" aria-label="<?php esc_attr_e('Go to top', 'flatsome' ); ?>"><?php echo get_flatsome_icon( 'icon-angle-up' ); ?></a>

View File

@@ -0,0 +1,46 @@
<?php
$align = 'small-text-center';
if ( get_theme_mod( 'footer_bottom_align' ) == 'center' ) {
$align = 'text-center';
}
ob_start();
do_action( 'flatsome_absolute_footer_secondary' );
$flatsome_absolute_footer_secondary = trim( ob_get_clean() );
$flatsome_footer_right_text = trim( get_theme_mod( 'footer_right_text' ) );
?>
<div class="absolute-footer <?php echo flatsome_option('footer_bottom_text'); ?> medium-text-center <?php echo $align;?>">
<div class="container clearfix">
<?php if ( $flatsome_footer_right_text || $flatsome_absolute_footer_secondary ) : ?>
<div class="footer-secondary pull-right">
<?php if ( $flatsome_footer_right_text ) : ?>
<div class="footer-text inline-block small-block">
<?php echo do_shortcode($flatsome_footer_right_text); ?>
</div>
<?php endif; ?>
<?php echo $flatsome_absolute_footer_secondary; ?>
</div>
<?php endif; ?>
<div class="footer-primary pull-left">
<?php if ( has_nav_menu( 'footer' ) ) : ?>
<?php
wp_nav_menu( array(
'theme_location' => 'footer',
'menu_class' => 'links footer-nav uppercase',
'depth' => 1,
'fallback_cb' => false,
) );
?>
<?php endif; ?>
<div class="copyright-footer">
<?php echo do_shortcode( get_theme_mod( 'footer_left_text', 'Copyright [ux_current_year] &copy; <strong>Flatsome Theme</strong>' ) ); ?>
</div>
<?php do_action( 'flatsome_absolute_footer_primary' ); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1 @@
<?php get_template_part('template-parts/footer/footer-absolute'); ?>

View File

@@ -0,0 +1,7 @@
<div class="absolute-footer fixed dark nav-dark text-center">
<div class="footer-primary">
<div class="copyright-footer">
<?php if(flatsome_option('footer_left_text')) { echo do_shortcode(flatsome_option('footer_left_text'));} ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<?php do_action('flatsome_before_footer'); ?>
<!-- FOOTER 1 -->
<?php if ( is_active_sidebar( 'sidebar-footer-1' ) && get_theme_mod('footer_1', 1) ) : ?>
<div class="footer-widgets footer footer-1">
<div class="<?php echo flatsome_footer_row_style('footer-1'); ?> mb-0">
<?php dynamic_sidebar('sidebar-footer-1'); ?>
</div>
</div>
<?php endif; ?>
<!-- FOOTER 2 -->
<?php if ( is_active_sidebar( 'sidebar-footer-2' ) && get_theme_mod('footer_2', 1) ) : ?>
<div class="footer-widgets footer footer-2 <?php if(flatsome_option('footer_2_color') == 'dark') echo 'dark'; ?>">
<div class="<?php echo flatsome_footer_row_style('footer-2'); ?> mb-0">
<?php dynamic_sidebar('sidebar-footer-2'); ?>
</div>
</div>
<?php endif; ?>
<?php do_action('flatsome_after_footer'); ?>
<?php get_template_part('template-parts/footer/footer-absolute'); ?>

View File

@@ -0,0 +1,42 @@
<?php if(flatsome_has_bottom_bar()['large_or_mobile']) {
?>
<div id="wide-nav" class="header-bottom wide-nav <?php header_inner_class('bottom'); ?>">
<div class="flex-row container">
<?php if(get_theme_mod('header_elements_bottom_left') || get_theme_mod('header_elements_bottom_right')){ ?>
<div class="flex-col hide-for-medium flex-left">
<ul class="nav header-nav header-bottom-nav nav-left <?php flatsome_nav_classes('bottom'); ?>">
<?php flatsome_header_elements('header_elements_bottom_left','nav_position_text'); ?>
</ul>
</div>
<?php } ?>
<?php if(get_theme_mod('header_elements_bottom_center')){ ?>
<div class="flex-col hide-for-medium flex-center">
<ul class="nav header-nav header-bottom-nav nav-center <?php flatsome_nav_classes('bottom'); ?>">
<?php flatsome_header_elements('header_elements_bottom_center','nav_position_text'); ?>
</ul>
</div>
<?php } ?>
<?php if(get_theme_mod('header_elements_bottom_right') || get_theme_mod('header_elements_bottom_left')){ ?>
<div class="flex-col hide-for-medium flex-right flex-grow">
<ul class="nav header-nav header-bottom-nav nav-right <?php flatsome_nav_classes('bottom'); ?>">
<?php flatsome_header_elements('header_elements_bottom_right','nav_position_text'); ?>
</ul>
</div>
<?php } ?>
<?php if(get_theme_mod('header_mobile_elements_bottom')) { ?>
<div class="flex-col show-for-medium flex-grow">
<ul class="nav header-bottom-nav nav-center mobile-nav <?php flatsome_nav_classes('bottom'); ?>">
<?php flatsome_header_elements('header_mobile_elements_bottom'); ?>
</ul>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<?php do_action('flatsome_after_header_bottom'); ?>

View File

@@ -0,0 +1,43 @@
<div id="masthead" class="header-main <?php header_inner_class('main'); ?>">
<div class="header-inner flex-row container <?php flatsome_logo_position(); ?>" role="navigation">
<!-- Logo -->
<div id="logo" class="flex-col logo">
<?php get_template_part('template-parts/header/partials/element','logo'); ?>
</div>
<!-- Mobile Left Elements -->
<div class="flex-col show-for-medium flex-left">
<ul class="mobile-nav nav nav-left <?php flatsome_nav_classes('main-mobile'); ?>">
<?php flatsome_header_elements('header_mobile_elements_left','mobile'); ?>
</ul>
</div>
<!-- Left Elements -->
<div class="flex-col hide-for-medium flex-left
<?php if(get_theme_mod('logo_position', 'left') == 'left') echo 'flex-grow'; ?>">
<ul class="header-nav header-nav-main nav nav-left <?php flatsome_nav_classes('main'); ?>" >
<?php flatsome_header_elements('header_elements_left'); ?>
</ul>
</div>
<!-- Right Elements -->
<div class="flex-col hide-for-medium flex-right">
<ul class="header-nav header-nav-main nav nav-right <?php flatsome_nav_classes('main'); ?>">
<?php flatsome_header_elements('header_elements_right'); ?>
</ul>
</div>
<!-- Mobile Right Elements -->
<div class="flex-col show-for-medium flex-right">
<ul class="mobile-nav nav nav-right <?php flatsome_nav_classes('main-mobile'); ?>">
<?php flatsome_header_elements('header_mobile_elements_right','mobile'); ?>
</ul>
</div>
</div>
<?php if(get_theme_mod('header_divider', 1)) { ?>
<div class="container"><div class="top-divider full-width"></div></div>
<?php }?>
</div>

View File

@@ -0,0 +1,32 @@
<?php if(flatsome_has_top_bar()['large_or_mobile']){ ?>
<div id="top-bar" class="header-top <?php header_inner_class('top'); ?>">
<div class="flex-row container">
<div class="flex-col hide-for-medium flex-left">
<ul class="nav nav-left medium-nav-center nav-small <?php flatsome_nav_classes('top'); ?>">
<?php flatsome_header_elements('topbar_elements_left'); ?>
</ul>
</div>
<div class="flex-col hide-for-medium flex-center">
<ul class="nav nav-center nav-small <?php flatsome_nav_classes('top'); ?>">
<?php flatsome_header_elements('topbar_elements_center'); ?>
</ul>
</div>
<div class="flex-col hide-for-medium flex-right">
<ul class="nav top-bar-nav nav-right nav-small <?php flatsome_nav_classes('top'); ?>">
<?php flatsome_header_elements('topbar_elements_right'); ?>
</ul>
</div>
<?php if(get_theme_mod('header_mobile_elements_top')) { ?>
<div class="flex-col show-for-medium flex-grow">
<ul class="nav nav-center nav-small mobile-nav <?php flatsome_nav_classes('top'); ?>">
<?php flatsome_header_elements('header_mobile_elements_top'); ?>
</ul>
</div>
<?php } ?>
</div>
</div>
<?php } ?>

View File

@@ -0,0 +1,19 @@
<?php
// Get Header Top template. Located in flatsome/template-parts/header/header-top.php
get_template_part('template-parts/header/header','top');
// Get Header Main template. Located in flatsome/template-parts/header/header-main.php
get_template_part('template-parts/header/header', 'main');
// Get Header Bottom template. Located in flatsome/template-parts/header/header-bottom-*.php
get_template_part('template-parts/header/header', 'bottom');
// Header Backgrounds
echo '<div class="header-bg-container fill">';
do_action('flatsome_header_background');
echo '</div>';
do_action('flatsome_header_wrapper');
?>

View File

@@ -0,0 +1,36 @@
<?php
$color = get_theme_mod('site_loader_color');
$bg_color = get_theme_mod('site_loader_bg');
if(empty($bg_color) && $color == 'dark'){
$bg_color = get_theme_mod('color_primary', Flatsome_Default::COLOR_PRIMARY );
} else if(empty($bg_color)){
$bg_color = '#fff';
}
?>
<div class="page-loader fixed fill z-top-3 <?php if($color == 'dark') echo 'nav-dark dark'; ?>">
<div class="page-loader-inner x50 y50 md-y50 md-x50 lg-y50 lg-x50 absolute">
<div class="page-loader-logo" style="padding-bottom: 30px;">
<?php get_template_part('template-parts/header/partials/element','logo'); ?>
</div>
<div class="page-loader-spin"><div class="loading-spin"></div></div>
</div>
<style>
.page-loader{opacity: 0; transition: opacity .3s; transition-delay: .3s;
background-color: <?php echo $bg_color; ?>;
}
.loading-site .page-loader{opacity: .98;}
.page-loader-logo{max-width: <?php echo get_theme_mod('logo_width', 200); ?>px; animation: pageLoadZoom 1.3s ease-out; -webkit-animation: pageLoadZoom 1.3s ease-out;}
.page-loader-spin{animation: pageLoadZoomSpin 1.3s ease-out;}
.page-loader-spin .loading-spin{width: 40px; height: 40px; }
@keyframes pageLoadZoom {
0% {opacity:0; transform: translateY(30px);}
100% {opacity:1; transform: translateY(0);}
}
@keyframes pageLoadZoomSpin {
0% {opacity:0; transform: translateY(60px);}
100% {opacity:1; transform: translateY(0);}
}
</style>
</div>

View File

@@ -0,0 +1,9 @@
<?php $icon_style = flatsome_option('account_icon_style'); ?>
<li class="account-item has-icon">
<?php if($icon_style && $icon_style !== 'image' && $icon_style !== 'plain') echo '<div class="header-button">'; ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>"
class="account-link-mobile <?php echo get_flatsome_icon_class($icon_style, 'small');?>" title="<?php _e('My account', 'woocommerce'); ?>">
<?php echo get_flatsome_icon('icon-user'); ?>
</a>
<?php if($icon_style && $icon_style !== 'image' && $icon_style !== 'plain') echo '</div>'; ?>
</li>

View File

@@ -0,0 +1,41 @@
<?php if(is_woocommerce_activated()){ ?>
<li class="account-item has-icon menu-item">
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" class="account-link account-login" title="<?php _e('My account', 'woocommerce'); ?>">
<?php if(flatsome_option('account_icon') == 'icon'){
echo get_flatsome_icon('icon-user');
} else if(flatsome_option('account_icon') == 'avatar'){
echo '<i class="image-icon circle">'.get_avatar(get_current_user_id()).'</i>';
}
?>
<span class="header-account-title">
<?php _e('My account', 'woocommerce'); ?>
</span>
</a>
<?php } else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>"
class="nav-top-link nav-top-not-logged-in">
<?php
if(flatsome_option('account_icon') == 'icon' || flatsome_option('account_icon') == 'avatar'){ echo get_flatsome_icon('icon-user');
}
?>
<span class="header-account-title">
<?php _e('Login', 'woocommerce'); ?>
</span>
</a>
<?php } ?>
<?php
// Show Dropdown for logged in users
if ( is_user_logged_in() ) { ?>
<ul class="children">
<?php wc_get_template('myaccount/account-links.php'); ?>
</ul>
<?php } ?>
</li>
<?php } else {
echo 'WooCommerce not Found';
}
?>

View File

@@ -0,0 +1,68 @@
<?php $icon_style = get_theme_mod('account_icon_style'); ?>
<?php if(is_woocommerce_activated()){ ?>
<li class="account-item has-icon
<?php if(is_account_page()) echo ' active'; ?>
<?php if ( is_user_logged_in() ) { ?> has-dropdown<?php } ?>"
>
<?php if($icon_style && $icon_style !== 'image' && $icon_style !== 'plain') echo '<div class="header-button">'; ?>
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" class="account-link account-login
<?php if($icon_style && $icon_style !== 'image') echo get_flatsome_icon_class($icon_style, 'small'); ?>"
title="<?php _e('My account', 'woocommerce'); ?>">
<?php if ( get_theme_mod( 'header_account_title', 1 ) ) { ?>
<span class="header-account-title">
<?php
if ( get_theme_mod( 'header_account_username' ) ) {
$current_user = wp_get_current_user();
echo apply_filters( 'flatsome_header_account_username', esc_html( $current_user->display_name ) );
} else {
esc_html_e( 'My account', 'woocommerce' );
}
?>
</span>
<?php } ?>
<?php if($icon_style == 'image'){
echo '<i class="image-icon circle">'.get_avatar(get_current_user_id()).'</i>';
} else if($icon_style){
echo get_flatsome_icon('icon-user');
} ?>
</a>
<?php } else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>"
class="nav-top-link nav-top-not-logged-in <?php if($icon_style && $icon_style !== 'image') echo get_flatsome_icon_class($icon_style, 'small'); ?>"
<?php if( get_theme_mod('account_login_style','lightbox') == 'lightbox' && !is_checkout() && !is_account_page() ) echo 'data-open="#login-form-popup"'; ?>
>
<?php if(get_theme_mod('header_account_title', 1)) { ?>
<span>
<?php _e('Login', 'woocommerce'); ?>
<?php if(get_theme_mod('header_account_register')){
echo ' / '.__('Register', 'woocommerce');
} ?>
</span>
<?php } else {
echo get_flatsome_icon('icon-user');
} ?>
</a>
<?php } ?>
<?php if($icon_style && $icon_style !== 'image' && $icon_style !== 'plain') echo '</div>'; ?>
<?php
// Show Dropdown for logged in users
if ( is_user_logged_in() ) { ?>
<ul class="nav-dropdown <?php flatsome_dropdown_classes(); ?>">
<?php wc_get_template('myaccount/account-links.php'); ?>
</ul>
<?php } ?>
</li>
<?php } else {
fl_header_element_error( 'woocommerce' );
}
?>

View File

@@ -0,0 +1,9 @@
<li class="html header-button-1">
<div class="header-button">
<?php
echo do_shortcode('[button text="'.flatsome_option('header_button_1').'" link="'.flatsome_option('header_button_1_link').'" target="'.flatsome_option('header_button_1_link_target').'" rel="'.get_theme_mod('header_button_1_link_rel').'" radius="'.flatsome_option('header_button_1_radius').'" size="'.flatsome_option('header_button_1_size').'" color="'.flatsome_option('header_button_1_color').'" depth="'.flatsome_option('header_button_1_depth').'" depth_hover="'.flatsome_option('header_button_1_depth_hover').'" style="'.flatsome_option('header_button_1_style').'"]');
?>
</div>
</li>

View File

@@ -0,0 +1,7 @@
<li class="html header-button-2">
<div class="header-button">
<?php
echo do_shortcode('[button text="'.flatsome_option('header_button_2').'" link="'.flatsome_option('header_button_2_link').'" target="'.flatsome_option('header_button_2_link_target').'" rel="'.get_theme_mod('header_button_2_link_rel').'" radius="'.flatsome_option('header_button_2_radius').'" size="'.flatsome_option('header_button_2_size').'" color="'.flatsome_option('header_button_2_color').'" depth="'.flatsome_option('header_button_2_depth').'" depth_hover="'.flatsome_option('header_button_2_depth_hover').'" style="'.flatsome_option('header_button_2_style').'"]');
?>
</div>
</li>

View File

@@ -0,0 +1,64 @@
<?php if ( is_woocommerce_activated() && flatsome_is_wc_cart_available() ) { ?>
<?php
// Get Cart replacement for catalog_mode
if(flatsome_option('catalog_mode')) { get_template_part('template-parts/header/partials/element','cart-replace'); return;}
$cart_style = flatsome_option('header_cart_style');
$custom_cart_content = flatsome_option('html_cart_header');
$icon_style = flatsome_option('cart_icon_style');
$icon = flatsome_option('cart_icon');
$disable_mini_cart = apply_filters( 'flatsome_disable_mini_cart', is_cart() || is_checkout() );
if ( $disable_mini_cart ) {
$cart_style = 'link';
}
?>
<li class="cart-item has-icon">
<?php if($icon_style && $icon_style !== 'plain') { ?><div class="header-button"><?php } ?>
<?php if ( $cart_style === 'link' ) : ?>
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php _e('Cart', 'woocommerce'); ?>" class="header-cart-link <?php echo get_flatsome_icon_class($icon_style, 'small'); ?>">
<?php else : ?>
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="header-cart-link off-canvas-toggle nav-top-link <?php echo get_flatsome_icon_class($icon_style, 'small'); ?>" data-open="#cart-popup" data-class="off-canvas-cart" title="<?php _e('Cart', 'woocommerce'); ?>" data-pos="right">
<?php endif; ?>
<?php
if(flatsome_option('custom_cart_icon')) { ?>
<span class="image-icon header-cart-icon" data-icon-label="<?php echo WC()->cart->cart_contents_count; ?>">
<img class="cart-img-icon" alt="<?php _e('Cart', 'woocommerce'); ?>" src="<?php echo do_shortcode(flatsome_option('custom_cart_icon')); ?>"/>
</span>
<?php }
else { ?>
<?php if(!$icon_style) { ?>
<span class="cart-icon image-icon">
<strong><?php echo WC()->cart->cart_contents_count; ?></strong>
</span>
<?php } else { ?>
<i class="icon-shopping-<?php echo $icon;?>"
data-icon-label="<?php echo WC()->cart->cart_contents_count; ?>">
</i>
<?php } ?>
<?php } ?>
</a>
<?php if($icon_style && $icon_style !== 'plain') { ?></div><?php } ?>
<?php if ( $cart_style !== 'off-canvas' && $cart_style !== 'link' ) { ?>
<!-- Cart Sidebar Popup -->
<div id="cart-popup" class="mfp-hide widget_shopping_cart">
<div class="cart-popup-inner inner-padding">
<div class="cart-popup-title text-center">
<h4 class="uppercase"><?php _e('Cart', 'woocommerce'); ?></h4>
<div class="is-divider"></div>
</div>
<div class="widget_shopping_cart_content">
<?php woocommerce_mini_cart(); ?>
</div>
<?php if($custom_cart_content) {
echo '<div class="header-cart-content">'.do_shortcode($custom_cart_content).'</div>'; }
?>
<?php do_action('flatsome_cart_sidebar'); ?>
</div>
</div>
<?php } ?>
</li>
<?php } ?>

View File

@@ -0,0 +1 @@
<?php if(flatsome_option('catalog_mode_header')) echo '<li class="html cart-replace">'.do_shortcode(flatsome_option('catalog_mode_header')).'</li>'; ?>

View File

@@ -0,0 +1,52 @@
<?php if ( is_woocommerce_activated() && flatsome_is_wc_cart_available() ) { ?>
<?php
// Get Cart replacement for `catalog_mode`.
if ( get_theme_mod( 'catalog_mode' ) ) {
get_template_part( 'template-parts/header/partials/element', 'cart-replace' );
return;
}
$custom_cart_content = get_theme_mod( 'html_cart_header' );
$icon_style = get_theme_mod( 'cart_icon_style' );
$icon = get_theme_mod( 'cart_icon', 'basket' );
$cart_title = get_theme_mod( 'header_cart_title', 1 );
$cart_total = get_theme_mod( 'header_cart_total', 1 );
?>
<li class="menu-item cart-item has-icon has-child">
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php _e( 'Cart', 'woocommerce' ); ?>" class="header-cart-link">
<?php if ( $cart_total || $cart_title ) { ?>
<span class="header-cart-title">
<?php if ( $cart_title ) { _e( 'Cart', 'woocommerce' ); } ?>
<?php /* divider */ if ( $cart_total && $cart_title ) { ?>/<?php } ?>
<?php if ( $cart_total ) { ?>
<span class="cart-price"><?php echo WC()->cart->get_cart_subtotal(); ?></span>
<?php } ?>
</span>
<?php } ?>
</a>
<ul class="children">
<li>
<!-- Cart Sidebar Popup -->
<div id="cart-popup" class="widget_shopping_cart">
<div class="cart-popup-inner inner-padding">
<div class="cart-popup-title text-center">
<h4 class="uppercase"><?php _e('Cart', 'woocommerce'); ?></h4>
<div class="is-divider"></div>
</div>
<div class="widget_shopping_cart_content">
<?php woocommerce_mini_cart(); ?>
</div>
<?php if($custom_cart_content) {
echo '<div class="header-cart-content">'.do_shortcode($custom_cart_content).'</div>'; }
?>
<?php do_action('flatsome_cart_sidebar'); ?>
</div>
</div>
</li>
</ul>
</li>
<?php } else {
fl_header_element_error( 'woocommerce' );
}
?>

View File

@@ -0,0 +1,94 @@
<?php if(is_woocommerce_activated() && flatsome_is_wc_cart_available() ) { ?>
<?php
// Get Cart replacement for catalog_mode
if(get_theme_mod('catalog_mode')) { get_template_part('template-parts/header/partials/element','cart-replace'); return;}
$cart_style = get_theme_mod('header_cart_style','dropdown');
$custom_cart_content = get_theme_mod('html_cart_header');
$icon_style = get_theme_mod('cart_icon_style');
$icon = get_theme_mod('cart_icon','basket');
$cart_title = get_theme_mod('header_cart_title', 1);
$cart_total = get_theme_mod('header_cart_total', 1);
$disable_mini_cart = apply_filters( 'flatsome_disable_mini_cart', is_cart() || is_checkout() );
if ( $disable_mini_cart ) {
$cart_style = 'link';
}
?>
<li class="cart-item has-icon<?php if($cart_style == 'dropdown') { ?> has-dropdown<?php } ?>">
<?php if($icon_style && $icon_style !== 'plain') { ?><div class="header-button"><?php } ?>
<?php if($cart_style !== 'off-canvas') { ?>
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php _e('Cart', 'woocommerce'); ?>" class="header-cart-link <?php echo get_flatsome_icon_class($icon_style, 'small'); ?>">
<?php } else if($cart_style == 'off-canvas') { ?>
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="header-cart-link off-canvas-toggle nav-top-link <?php echo get_flatsome_icon_class($icon_style, 'small'); ?>" data-open="#cart-popup" data-class="off-canvas-cart" title="<?php _e('Cart', 'woocommerce'); ?>" data-pos="right">
<?php } ?>
<?php if($cart_total || $cart_title) { ?>
<span class="header-cart-title">
<?php if($cart_title) { ?> <?php _e('Cart', 'woocommerce'); ?> <?php } ?>
<?php /* divider */ if($cart_total && $cart_title) { ?>/<?php } ?>
<?php if($cart_total) { ?>
<span class="cart-price"><?php echo WC()->cart->get_cart_subtotal(); ?></span>
<?php } ?>
</span>
<?php } ?>
<?php
if(get_theme_mod('custom_cart_icon')) { ?>
<span class="image-icon header-cart-icon" data-icon-label="<?php echo WC()->cart->cart_contents_count; ?>">
<img class="cart-img-icon" alt="<?php _e('Cart', 'woocommerce'); ?>" src="<?php echo do_shortcode(get_theme_mod('custom_cart_icon')); ?>"/>
</span>
<?php }
else { ?>
<?php if(!$icon_style) { ?>
<span class="cart-icon image-icon">
<strong><?php echo WC()->cart->cart_contents_count; ?></strong>
</span>
<?php } else { ?>
<i class="icon-shopping-<?php echo $icon;?>"
data-icon-label="<?php echo WC()->cart->cart_contents_count; ?>">
</i>
<?php } ?>
<?php } ?>
</a>
<?php if($icon_style && $icon_style !== 'plain') { ?></div><?php } ?>
<?php if($cart_style == 'dropdown') { ?>
<ul class="nav-dropdown <?php flatsome_dropdown_classes(); ?>">
<li class="html widget_shopping_cart">
<div class="widget_shopping_cart_content">
<?php woocommerce_mini_cart(); ?>
</div>
</li>
<?php if($custom_cart_content){
echo '<li class="html">'.do_shortcode($custom_cart_content).'</li>';
}
?>
</ul>
<?php } ?>
<?php if($cart_style == 'off-canvas') { ?>
<!-- Cart Sidebar Popup -->
<div id="cart-popup" class="mfp-hide widget_shopping_cart">
<div class="cart-popup-inner inner-padding">
<div class="cart-popup-title text-center">
<h4 class="uppercase"><?php _e('Cart', 'woocommerce'); ?></h4>
<div class="is-divider"></div>
</div>
<div class="widget_shopping_cart_content">
<?php woocommerce_mini_cart(); ?>
</div>
<?php if($custom_cart_content) {
echo '<div class="header-cart-content">'.do_shortcode($custom_cart_content).'</div>'; }
?>
<?php do_action('flatsome_cart_sidebar'); ?>
</div>
</div>
<?php } ?>
</li>
<?php } else {
fl_header_element_error( 'woocommerce' );
}
?>

View File

@@ -0,0 +1,14 @@
<?php
if ( ! is_woocommerce_activated() ) {
fl_header_element_error( 'woocommerce' );
return;
}
?>
<li>
<div class="cart-checkout-button header-button">
<a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="<?php if ( is_checkout() ) { ?>disabled<?php } ?> button cart-checkout secondary is-small circle">
<span class="hide-for-small"><?php esc_html_e( 'Checkout', 'woocommerce' ); ?></span>
<span class="show-for-small">+</span>
</a>
</div>
</li>

View File

@@ -0,0 +1,61 @@
<li class="header-contact-wrapper">
<?php
$class = 'has-icon';
$icon_size = flatsome_option('contact_icon_size');
$class_link = 'tooltip';
$nav = 'nav-divided nav-uppercase';
$label = true;
if(flatsome_option('contact_style') == 'icons'){
$label = false;
}
if(flatsome_option('contact_style') == 'top'){
$class .= ' icon-top';
}
?>
<div class="header-button"><a href="#"
data-open="#header-contact"
data-visible-after="true" data-class="text-center" data-pos="center"
class="icon show-for-medium"><?php echo get_flatsome_icon('icon-envelop',$icon_size); ?></a>
</div>
<ul id="header-contact" class="nav <?php echo $nav; ?> header-contact hide-for-medium">
<?php if(flatsome_option('contact_location')){ ?>
<li class="<?php echo $class; ?>">
<a target="_blank" rel="noopener noreferrer" href="https://maps.google.com/?q=<?php echo flatsome_option('contact_location'); ?>" title="<?php echo flatsome_option('contact_location'); ?>" class="<?php echo $class_link;?>">
<?php echo get_flatsome_icon('icon-map-pin-fill',$icon_size); ?>
<?php if($label) _e('Location','flatsome'); ?>
</a>
</li>
<?php } ?>
<?php if(flatsome_option('contact_email')){ ?>
<li class="<?php echo $class; ?>">
<a href="mailto:<?php echo flatsome_option('contact_email'); ?>" class="<?php echo $class_link;?>" title="<?php echo flatsome_option('contact_email'); ?>">
<?php echo get_flatsome_icon('icon-envelop',$icon_size); ?>
<?php if($label) _e('Contact','flatsome'); ?>
</a>
</li>
<?php } ?>
<?php if(flatsome_option('contact_hours')){ ?>
<li class="<?php echo $class; ?>">
<a class="<?php echo $class_link;?>" title="<?php echo flatsome_option('contact_hours').' | '.flatsome_option('contact_hours_details'); ?>">
<?php echo get_flatsome_icon('icon-clock',$icon_size); ?>
<?php if($label) echo flatsome_option('contact_hours'); ?>
</a>
</li>
<?php } ?>
<?php if(flatsome_option('contact_phone')){ ?>
<li class="<?php echo $class; ?>">
<a href="tel:<?php echo flatsome_option('contact_phone'); ?>" class="<?php echo $class_link;?>" title="<?php echo flatsome_option('contact_phone'); ?>">
<?php echo get_flatsome_icon('icon-phone',$icon_size); ?>
<?php if($label) echo flatsome_option('contact_phone'); ?>
</a>
</li>
<?php } ?>
</ul>
</li>

View File

@@ -0,0 +1,72 @@
<li class="header-contact-wrapper">
<?php
$class = '';
$icon_size = flatsome_option('contact_icon_size');
$class_link = 'tooltip';
$nav = 'nav-divided nav-uppercase';
$label = true;
if(flatsome_option('contact_style') == 'icons'){
$label = false;
}
?>
<ul id="header-contact" class="nav <?php echo $nav; ?> header-contact">
<?php if(flatsome_option('contact_location')){ ?>
<li class="<?php echo $class; ?>">
<a target="_blank" rel="noopener noreferrer" href="https://maps.google.com/?q=<?php echo flatsome_option('contact_location'); ?>" title="<?php echo flatsome_option('contact_location'); ?>" class="<?php echo $class_link;?>">
<?php echo get_flatsome_icon('icon-map-pin-fill',$icon_size); ?>
<span>
<?php
$location_label = flatsome_option('contact_location_label');
if($location_label && $label){
echo $location_label;
} else if($label){
_e('Location','flatsome');
} ?>
</span>
</a>
</li>
<?php } ?>
<?php
$contact_email = get_theme_mod('contact_email','youremail@gmail.com');
if($contact_email){ ?>
<li class="<?php echo $class; ?>">
<a href="mailto:<?php echo $contact_email; ?>" class="<?php echo $class_link;?>" title="<?php echo $contact_email; ?>">
<?php echo get_flatsome_icon('icon-envelop',$icon_size); ?>
<span>
<?php
$contact_label = get_theme_mod('contact_email_label');
if($contact_label && $label) {
echo $contact_label;
} else if($label){
_e('Contact','flatsome');
} ?>
</span>
</a>
</li>
<?php } ?>
<?php
$contact_hours = get_theme_mod('contact_hours','08:00 - 17:00');
if($contact_hours){
$contact_hours_details = get_theme_mod('contact_hours_details');
?>
<li class="<?php echo $class; ?>">
<a class="<?php echo $class_link;?>" title="<?php echo $contact_hours; ?><?php if($contact_hours_details) echo ' | '.$contact_hours_details; ?> ">
<?php echo get_flatsome_icon('icon-clock',$icon_size); ?>
<span><?php if($label) echo $contact_hours; ?></span>
</a>
</li>
<?php } ?>
<?php if(flatsome_option('contact_phone')){ ?>
<li class="<?php echo $class; ?>">
<a href="tel:<?php echo flatsome_option('contact_phone'); ?>" class="<?php echo $class_link;?>" title="<?php echo flatsome_option('contact_phone'); ?>">
<?php echo get_flatsome_icon('icon-phone',$icon_size); ?>
<span><?php if($label) echo flatsome_option('contact_phone'); ?></span>
</a>
</li>
<?php } ?>
</ul>
</li>

View File

@@ -0,0 +1,31 @@
<li class="menu-item">
<a href="#sitemap" data-color="light" data-open="#departments-overlay" data-pos="dropdown">
Departments
</a>
<div id="departments-overlay" class="mfp-hide container">
<ul class="nav nav-vertical nav-uppercase tabs">
<li class="description_tab active">
<a href="#tab-description">Description</a>
</li>
<li class="additional_information_tab">
<a href="#tab-additional_information">Additional Information</a>
</li>
<li class="reviews_tab">
<a href="#tab-reviews">Reviews (3)</a>
</li>
</ul>
<div class="tab-panels">
<div id="tab-description" class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
</div>
</div>
</li>

View File

@@ -0,0 +1,53 @@
<?php
/**
* Custom Languages dropdown for sidebar
*/
$current_lang = 'Languages';
$flag = null;
$languages = null;
// Polylang elseif WMPL.
if ( function_exists( 'pll_the_languages' ) ) {
$languages = pll_the_languages( array( 'raw' => 1 ) );
foreach ( $languages as $lang ) {
if ( $lang['current_lang'] ) {
$flag = '<i class="image-icon"><img src="' . $lang['flag'] . '" alt="' . $lang['name'] . '"/></i>';
$current_lang = $lang['name'];
}
}
} elseif ( function_exists( 'icl_get_languages' ) ) {
$languages = icl_get_languages();
foreach ( $languages as $lang ) {
if ( $lang['active'] ) {
$flag = '<i class="image-icon"><img src="' . $lang['country_flag_url'] . '" alt="' . $lang['native_name'] . '"/></i>';
$current_lang = $lang['native_name'];
}
}
}
?>
<li>
<a href="#">
<?php echo $current_lang; ?>
<?php echo $flag; ?>
</a>
<ul class="children">
<?php
// Polylang elseif WMPL.
if ( $languages && function_exists( 'pll_the_languages' ) ) {
foreach ( $languages as $lang ) {
if ( $lang['current_lang'] ) $current = 'class="active"';
echo '<li><a href="' . $lang['url'] . '" hreflang="' . $lang['slug'] . '"><i class="icon-image"><img src="' . $lang['flag'] . '" alt="' . $lang['name'] . '"/></i> ' . $lang['name'] . '</a></li>';
}
} elseif ( $languages && function_exists( 'icl_get_languages' ) ) {
foreach ( $languages as $lang ) {
$current = '';
echo '<li><a href="' . $lang['url'] . '" hreflang="' . $lang['language_code'] . '"><i class="icon-image"><img src="' . $lang['country_flag_url'] . '" alt="' . $lang['native_name'] . '"/></i> ' . $lang['native_name'] . '</a></li>';
}
}
if ( ! function_exists( 'pll_the_languages' ) && ! function_exists( 'icl_get_languages' ) ) {
echo '<li><a>You need Polylang or WPML plugin for this to work. You can remove it from Theme Options.</a></li>';
}
?>
</ul>
</li>

View File

@@ -0,0 +1,54 @@
<?php
/**
* Custom Languages dropdown
*/
$current_lang = 'Languages';
$flag = null;
$languages = null;
// Polylang elseif WMPL.
if ( function_exists( 'pll_the_languages' ) ) {
$languages = pll_the_languages( array( 'raw' => 1 ) );
foreach ( $languages as $lang ) {
if ( $lang['current_lang'] ) {
$flag = '<i class="image-icon"><img src="' . $lang['flag'] . '" alt="' . $lang['name'] . '"/></i>';
$current_lang = $lang['name'];
}
}
} elseif ( function_exists( 'icl_get_languages' ) ) {
$languages = icl_get_languages();
foreach ( $languages as $lang ) {
if ( $lang['active'] ) {
$flag = '<i class="image-icon"><img src="' . $lang['country_flag_url'] . '" alt="' . $lang['native_name'] . '"/></i>';
$current_lang = $lang['native_name'];
}
}
}
?>
<li class="has-dropdown header-language-dropdown">
<a href="#">
<?php echo $current_lang; ?>
<?php echo $flag; ?>
<?php echo get_flatsome_icon( 'icon-angle-down' ); ?>
</a>
<ul class="nav-dropdown <?php flatsome_dropdown_classes(); ?>">
<?php
// Polylang elseif WMPL.
if ( $languages && function_exists( 'pll_the_languages' ) ) {
foreach ( $languages as $lang ) {
if ( $lang['current_lang'] ) $current = 'class="active"';
echo '<li><a href="' . $lang['url'] . '" hreflang="' . $lang['slug'] . '"><i class="icon-image"><img src="' . $lang['flag'] . '" alt="' . $lang['name'] . '"/></i> ' . $lang['name'] . '</a></li>';
}
} elseif ( $languages && function_exists( 'icl_get_languages' ) ) {
foreach ( $languages as $lang ) {
$current = '';
echo '<li><a href="' . $lang['url'] . '" hreflang="' . $lang['language_code'] . '"><i class="icon-image"><img src="' . $lang['country_flag_url'] . '" alt="' . $lang['native_name'] . '"/></i> ' . $lang['native_name'] . '</a></li>';
}
}
if ( ! function_exists( 'pll_the_languages' ) && ! function_exists( 'icl_get_languages' ) ) {
echo '<li><a>You need Polylang or WPML plugin for this to work. You can remove it from Theme Options.</a></li>';
}
?>
</ul>
</li>

View File

@@ -0,0 +1,48 @@
<?php
$site_logo_id = flatsome_option( 'site_logo' );
$site_logo_sticky_id = flatsome_option( 'site_logo_sticky' );
$site_logo_dark_id = flatsome_option( 'site_logo_dark' );
$site_logo = wp_get_attachment_image_src( $site_logo_id, 'large' );
$site_logo_sticky = wp_get_attachment_image_src( $site_logo_sticky_id, 'large' );
$site_logo_dark = wp_get_attachment_image_src( $site_logo_dark_id, 'large' );
$logo_link = get_theme_mod( 'logo_link' );
$logo_link = $logo_link ? $logo_link : home_url( '/' );
$width = get_theme_mod( 'logo_width', 200 );
$height = get_theme_mod( 'header_height', 90 );
if ( ! empty( $site_logo_id ) && ! is_numeric( $site_logo_id ) ) {
// Fallback to `logo_width` and `header_height` if
// the logo is a string, ie. it's the default value.
$site_logo = array( $site_logo_id, $width, $height );
}
if ( ! empty( $site_logo_sticky_id ) && ! is_numeric( $site_logo_sticky_id ) ) {
$site_logo_sticky = array( $site_logo_sticky_id, $width, $height );
}
if ( ! empty( $site_logo_dark_id ) && ! is_numeric( $site_logo_dark_id ) ) {
$site_logo_dark = array( $site_logo_dark_id, $width, $height );
}
?>
<!-- Header logo -->
<a href="<?php echo esc_url( $logo_link ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?><?php echo get_bloginfo( 'name' ) && get_bloginfo( 'description' ) ? ' - ' : ''; ?><?php bloginfo( 'description' ); ?>" rel="home">
<?php
if ( $site_logo ) {
$site_title = esc_attr( get_bloginfo( 'name', 'display' ) );
if ( $site_logo_sticky ) echo '<img width="' . esc_attr( $site_logo_sticky[1] ) . '" height="' . esc_attr( $site_logo_sticky[2] ) . '" src="' . esc_url( $site_logo_sticky[0] ) . '" class="header-logo-sticky" alt="'.$site_title.'"/>';
echo '<img width="' . esc_attr( $site_logo[1] ) . '" height="' . esc_attr( $site_logo[2] ) . '" src="' . esc_url( $site_logo[0] ) . '" class="header_logo header-logo" alt="'.$site_title.'"/>';
if ( $site_logo_dark ) echo '<img width="' . esc_attr( $site_logo_dark[1] ) . '" height="' . esc_attr( $site_logo_dark[2] ) . '" src="' . esc_url( $site_logo_dark[0] ) . '" class="header-logo-dark" alt="'.$site_title.'"/>';
else echo '<img width="' . esc_attr( $site_logo[1] ) . '" height="' . esc_attr( $site_logo[2] ) . '" src="' . esc_url( $site_logo[0] ) . '" class="header-logo-dark" alt="'.$site_title.'"/>';
} else {
bloginfo( 'name' );
}
?>
</a>
<?php
if(get_theme_mod('site_logo_slogan')){
echo '<p class="logo-tagline">'.get_bloginfo('description').'</p>';
}
?>

View File

@@ -0,0 +1,11 @@
<?php $icon_style = flatsome_option('menu_icon_style'); ?>
<li class="nav-icon has-icon">
<?php if($icon_style) { ?><div class="header-button"><?php } ?>
<a href="#" data-open="#main-menu" data-pos="<?php echo flatsome_option('mobile_overlay');?>" data-bg="main-menu-overlay" data-color="<?php echo flatsome_option('mobile_overlay_color');?>" class="<?php echo get_flatsome_icon_class($icon_style, 'small'); ?>" aria-label="<?php echo __('Menu','flatsome'); ?>" aria-controls="main-menu" aria-expanded="false">
<?php echo get_flatsome_icon('icon-menu'); ?>
<?php if(flatsome_option('menu_icon_title')) echo '<span class="menu-title uppercase hide-for-small">'.__('Menu','flatsome').'</span>'; ?>
</a>
<?php if($icon_style) { ?> </div> <?php } ?>
</li>

View File

@@ -0,0 +1,53 @@
<?php
/**
* Header vertical menu template.
*
* @package Flatsome
*/
$classes_opener = array( 'header-vertical-menu__opener' );
$classes_fly_out = array( 'header-vertical-menu__fly-out' );
if ( get_theme_mod( 'header_nav_vertical_text_color', 'dark' ) === 'dark' ) $classes_opener[] = 'dark';
if ( get_theme_mod( 'header_nav_vertical_fly_out_text_color', 'light' ) === 'dark' ) $classes_fly_out[] = 'dark';
if ( is_front_page() && get_theme_mod( 'header_nav_vertical_fly_out_frontpage', 1 ) ) $classes_fly_out[] = 'header-vertical-menu__fly-out--open';
if ( get_theme_mod( 'header_nav_vertical_fly_out_shadow', 1 ) ) $classes_fly_out[] = 'has-shadow';
?>
<li class="header-vertical-menu" role="navigation">
<div class="<?php echo esc_attr( implode( ' ', $classes_opener ) ); ?>">
<?php if ( get_theme_mod( 'header_nav_vertical_icon_style', 'plain' ) ) : ?>
<span class="header-vertical-menu__icon">
<?php echo get_flatsome_icon( 'icon-menu' ); ?>
</span>
<?php endif; ?>
<span class="header-vertical-menu__title">
<?php if ( get_theme_mod( 'header_nav_vertical_tagline' ) ) : ?>
<span class="header-vertical-menu__tagline"><?php echo esc_html( get_theme_mod( 'header_nav_vertical_tagline' ) ); ?></span>
<?php endif; ?>
<?php
if ( get_theme_mod( 'header_nav_vertical_text' ) ) :
echo esc_html( get_theme_mod( 'header_nav_vertical_text' ) );
else :
esc_html_e( 'Categories', 'flatsome' );
endif;
?>
</span>
<?php echo get_flatsome_icon( 'icon-angle-down' ); ?>
</div>
<div class="<?php echo esc_attr( implode( ' ', $classes_fly_out ) ); ?>">
<?php
// TODO maybe refactor flatsome_header_nav() to render here?
if ( has_nav_menu( 'vertical' ) ) {
wp_nav_menu( array(
'theme_location' => 'vertical',
'menu_class' => 'ux-nav-vertical-menu nav-vertical-fly-out',
'walker' => new FlatsomeNavDropdown(),
) );
} else {
$admin_url = get_admin_url() . 'customize.php?url=' . get_permalink() . '&autofocus%5Bsection%5D=menu_locations';
echo '<li><a href="' . $admin_url . '">Assign a menu in Theme Options > Menus</a></li>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
</div>
</li>

View File

@@ -0,0 +1,15 @@
<?php
$label = get_theme_mod('header_newsletter_label','Newsletter');
$title = get_theme_mod('header_newsletter_title','Sign up for Newsletter');
?>
<li class="header-newsletter-item has-icon">
<a href="#header-newsletter-signup" class="tooltip" title="<?php echo $title; ?>">
<i class="icon-envelop"></i>
<span class="header-newsletter-title">
<?php echo $label; ?>
</span>
</a>
</li>

View File

@@ -0,0 +1,46 @@
<?php
$icon_style = get_theme_mod( 'newsletter_icon_style', 'plain' );
$label = get_theme_mod( 'header_newsletter_label', 'Newsletter' );
$title = get_theme_mod( 'header_newsletter_title', 'Sign up for Newsletter' );
$newsletter_block = get_theme_mod( 'header_newsletter_block' );
if ( ! $newsletter_block ) {
$sub_title = get_theme_mod( 'header_newsletter_sub_title', 'Signup for our newsletter to get notified about sales and new products. Add any text here or remove it.' );
$bg = do_shortcode( get_theme_mod( 'header_newsletter_bg', flatsome_dummy_image() ) );
$height = get_theme_mod( 'header_newsletter_height', '500px' );
}
$auto_open = get_theme_mod( 'header_newsletter_auto_open', false );
$auto_timer = get_theme_mod( 'header_newsletter_auto_timer', 3000 );
$auto_show = get_theme_mod( 'header_newsletter_auto_show', 'always' );
$version = get_theme_mod( 'header_newsletter_version', '1' );
$behavior = $auto_open ? ' auto_open="true"' : '';
$behavior .= $auto_open ? ' auto_timer="' . $auto_timer . '"' : '';
$behavior .= $auto_open ? ' auto_show="' . $auto_show . '"' : '';
$behavior .= ' version="' . $version . '"';
?>
<li class="header-newsletter-item has-icon">
<?php if($icon_style && $icon_style !== 'plain') echo '<div class="header-button">'; ?>
<a href="#header-newsletter-signup" class="tooltip <?php if($icon_style) echo get_flatsome_icon_class($icon_style, 'small'); ?>"
title="<?php echo $title; ?>">
<?php if($icon_style) { ?>
<i class="icon-envelop"></i>
<?php } ?>
<?php if($label) { ?>
<span class="header-newsletter-title hide-for-medium">
<?php echo $label; ?>
</span>
<?php } ?>
</a>
<?php if($icon_style && $icon_style !== 'plain') echo '</div>'; ?>
<?php if(!$newsletter_block){ ?>
<?php $content = '<h3 class="uppercase">'.$title.'</h3><p class="lead">'.$sub_title.'</p>'.get_theme_mod('header_newsletter_shortcode','[contact-form-7 id="7042" title="Newsletter Vertical"]'); ?>
<?php echo do_shortcode('[lightbox' . $behavior . ' width="700px" padding="0px" id="header-newsletter-signup"][ux_banner bg="'.$bg.'" border="2px 2px 2px 2px" border_color="rgba(255,255,255,.3)" border_style="dashed" border_margin="10px" bg_overlay="rgba(0,0,0,.4)" height="'.$height.'"][text_box animate="fadeInUp" position_x="10" text_align="left" width="50%" width__sm="60%"]'.$content.'[/text_box][/ux_banner][/lightbox]'); ?>
<?php } else { ?>
<?php echo do_shortcode('[lightbox' . $behavior . ' width="700px" padding="0px" id="header-newsletter-signup"]'.do_shortcode('[block id="'.$newsletter_block.'"]').'[/lightbox]'); ?>
<?php } ?>
</li>

View File

@@ -0,0 +1,5 @@
<li class="header-search-form search-form html relative has-icon">
<div class="header-search-form-wrapper">
<?php echo do_shortcode('[search style="'.flatsome_option('header_search_form_style').'"]'); ?>
</div>
</li>

View File

@@ -0,0 +1,24 @@
<?php $icon_style = get_theme_mod('search_icon_style'); ?>
<?php if(get_theme_mod('header_search_style') !== 'lightbox') { ?>
<li class="header-search header-search-dropdown has-icon has-dropdown menu-item-has-children">
<?php if($icon_style) { ?><div class="header-button"><?php } ?>
<a href="#" aria-label="<?php echo __('Search','woocommerce'); ?>" class="<?php echo get_flatsome_icon_class(flatsome_option('search_icon_style'), 'small'); ?>"><?php echo get_flatsome_icon('icon-search'); ?></a>
<?php if($icon_style) { ?></div><?php } ?>
<ul class="nav-dropdown <?php flatsome_dropdown_classes(); ?>">
<?php get_template_part('template-parts/header/partials/element-search-form'); ?>
</ul>
</li>
<?php } else if(get_theme_mod('header_search_style') == 'lightbox') { ?>
<li class="header-search header-search-lightbox has-icon">
<?php if($icon_style) { ?><div class="header-button"><?php } ?>
<a href="#search-lightbox" aria-label="<?php echo __('Search','woocommerce'); ?>" data-open="#search-lightbox" data-focus="input.search-field"
class="<?php echo get_flatsome_icon_class(get_theme_mod('search_icon_style'), 'small'); ?>">
<?php echo get_flatsome_icon('icon-search', '16px'); ?></a>
<?php if($icon_style) { ?></div>
<?php } ?>
<div id="search-lightbox" class="mfp-hide dark text-center">
<?php echo do_shortcode('[search size="large" style="'.get_theme_mod('header_search_form_style').'"]'); ?>
</div>
</li>
<?php } ?>

View File

@@ -0,0 +1,3 @@
<li class="html header-social-icons ml-0">
<?php echo do_shortcode('[follow defaults="true" style="'.flatsome_option('follow_style').'"]')?>
</li>

View File

@@ -0,0 +1,19 @@
<?php
// Exit if class does not exist.
if ( ! class_exists( 'YITH_WCWL' ) ) {
return;
}
$icon_style = get_theme_mod( 'wishlist_icon_style' );
?>
<li class="header-wishlist-icon has-icon">
<?php if($icon_style) { ?><div class="header-button"><?php } ?>
<a href="<?php echo YITH_WCWL()->get_wishlist_url(); ?>" class="wishlist-link <?php if ( $icon_style ) echo get_flatsome_icon_class( $icon_style, 'small' ); ?>">
<i class="wishlist-icon icon-<?php echo get_theme_mod( 'wishlist_icon', 'heart' ); ?>"
<?php if ( YITH_WCWL()->count_products() > 0 ){ ?> data-icon-label="<?php echo YITH_WCWL()->count_products(); ?>" <?php } ?>>
</i>
</a>
<?php if($icon_style) { ?> </div> <?php } ?>
</li>

View File

@@ -0,0 +1,25 @@
<?php
// Exit if class does not exist.
if(!class_exists( 'YITH_WCWL' )) return;
$icon = flatsome_option('wishlist_icon');
$icon_style = flatsome_option('wishlist_icon_style');
?>
<li class="header-wishlist-icon">
<?php if($icon_style) { ?><div class="header-button"><?php } ?>
<a href="<?php echo YITH_WCWL()->get_wishlist_url(); ?>" class="wishlist-link <?php echo get_flatsome_icon_class($icon_style, 'small'); ?>">
<?php if(flatsome_option('wishlist_title')) { ?>
<span class="hide-for-medium header-wishlist-title">
<?php if(flatsome_option('header_wishlist_label')) {echo flatsome_option('header_wishlist_label');} else{ _e('Wishlist', 'woocommerce');} ?>
</span>
<?php } ?>
<?php if($icon){ ?>
<i class="wishlist-icon icon-<?php echo $icon; ?>"
<?php if(YITH_WCWL()->count_products() > 0){ ?>data-icon-label="<?php echo YITH_WCWL()->count_products() ; ?>" <?php } ?>>
</i>
<?php } ?>
</a>
<?php if($icon_style) { ?> </div> <?php } ?>
</li>

View File

@@ -0,0 +1,72 @@
<?php
/**
* The overlay menu.
*
* @package flatsome
*/
$flatsome_mobile_overlay = get_theme_mod( 'mobile_overlay' );
$flatsome_mobile_sidebar_classes = array( 'mobile-sidebar', 'no-scrollbar', 'mfp-hide' );
$flatsome_nav_classes = array( 'nav', 'nav-sidebar', 'nav-vertical', 'nav-uppercase' );
$flatsome_levels = 0;
if ( 'center' == $flatsome_mobile_overlay ) {
$flatsome_nav_classes[] = 'nav-anim';
}
if (
'center' != $flatsome_mobile_overlay &&
'slide' == get_theme_mod( 'mobile_submenu_effect' )
) {
$flatsome_levels = (int) get_theme_mod( 'mobile_submenu_levels', '1' );
$flatsome_mobile_sidebar_classes[] = 'mobile-sidebar-slide';
$flatsome_nav_classes[] = 'nav-slide';
for ( $level = 1; $level <= $flatsome_levels; $level++ ) {
$flatsome_mobile_sidebar_classes[] = "mobile-sidebar-levels-{$level}";
}
}
?>
<div id="main-menu" class="<?php echo esc_attr( implode( ' ', $flatsome_mobile_sidebar_classes ) ); ?>"<?php echo $flatsome_levels ? ' data-levels="' . esc_attr( $flatsome_levels ) . '"' : ''; ?>>
<?php do_action( 'flatsome_before_sidebar_menu' ); ?>
<div class="sidebar-menu no-scrollbar <?php if ( $flatsome_mobile_overlay == 'center') echo 'text-center'; ?>">
<?php do_action( 'flatsome_before_sidebar_menu_elements' ); ?>
<?php if ( get_theme_mod( 'mobile_sidebar_tabs' ) ) : ?>
<ul class="sidebar-menu-tabs flex nav nav-line-bottom nav-uppercase">
<li class="sidebar-menu-tabs__tab active">
<a class="sidebar-menu-tabs__tab-link" href="#">
<span class="sidebar-menu-tabs__tab-text"><?php echo get_theme_mod( 'mobile_sidebar_tab_text' ) ? esc_html( get_theme_mod( 'mobile_sidebar_tab_text' ) ) : esc_html__( 'Menu', 'flatsome' ); ?></span>
</a>
</li>
<li class="sidebar-menu-tabs__tab">
<a class="sidebar-menu-tabs__tab-link" href="#">
<span class="sidebar-menu-tabs__tab-text"><?php echo get_theme_mod( 'mobile_sidebar_tab_2_text' ) ? esc_html( get_theme_mod( 'mobile_sidebar_tab_2_text' ) ) : esc_html__( 'Categories', 'flatsome' ); ?></span>
</a>
</li>
</ul>
<ul class="<?php echo esc_attr( implode( ' ', $flatsome_nav_classes ) ); ?> hidden" data-tab="2">
<?php flatsome_header_elements( 'mobile_sidebar_tab_2', 'sidebar' ); ?>
</ul>
<ul class="<?php echo esc_attr( implode( ' ', $flatsome_nav_classes ) ); ?>" data-tab="1">
<?php flatsome_header_elements( 'mobile_sidebar', 'sidebar' ); ?>
</ul>
<?php else : ?>
<ul class="<?php echo esc_attr( implode( ' ', $flatsome_nav_classes ) ); ?>" data-tab="1">
<?php flatsome_header_elements( 'mobile_sidebar', 'sidebar' ); ?>
</ul>
<?php endif; ?>
<?php do_action( 'flatsome_after_sidebar_menu_elements' ); ?>
</div>
<?php do_action( 'flatsome_after_sidebar_menu' ); ?>
</div>

View File

@@ -0,0 +1,13 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-text-center">
<div class="flex-col flex-grow text-center">
<h1 class="page-title uppercase"><?php echo get_the_title() ?></h1>
<?php flatsome_breadcrumb( 'page-breadcrumbs' ); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,9 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<?php flatsome_breadcrumb( 'page-breadcrumbs' ); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<h1 class="page-title uppercase mb-0"><?php echo get_the_title() ?></h1>
</div>
<div class="flex-col">
<?php flatsome_breadcrumb( 'page-breadcrumbs' ); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row">
<div class="flex-col flex-grow text-center">
<h1 class="page-title uppercase"><?php echo get_the_title() ?></h1>
<div class="is-divider"></div>
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="page-title <?php flatsome_header_title_classes() ?> is-sticky">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-text-center">
<div class="flex-col flex-grow">
<h1 class="page-title uppercase mb-0"><?php echo get_the_title() ?></h1>
</div>
<div class="flex-col">
Scroll To This
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="page-title <?php flatsome_header_title_classes() ?> is-sticky">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-text-center">
<div class="flex-col flex-grow">
<h1 class="page-title uppercase mb-0"><?php echo get_the_title() ?></h1>
</div>
<div class="flex-col">
Scroll To this
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="page-title <?php flatsome_header_title_classes() ?> ">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<h1 class="page-title uppercase mb-0"><?php echo get_the_title() ?></h1>
</div>
<div class="flex-col">
<?php get_flatsome_subnav(); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<?php get_flatsome_subnav(); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<h1 class="page-title uppercase mb-0">
<?php echo get_the_title() ?>
</h1>
</div>
<div class="flex-col">
<?php get_flatsome_subnav(); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<div class="page-title <?php flatsome_header_title_classes() ?>">
<div class="page-title-bg fill"><div class="page-title-bg-overlay"></div></div>
<div class="page-title-inner container flex-row medium-text-center">
<div class="flex-col">
<h1 class="page-title uppercase mb-0"><?php echo get_the_title() ?></h1>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<div class="page-title normal-title">
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<h1 class="entry-title is-larger uppercase pb-0 pt-0 mb-0">
<?php
if(is_tax()){
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
echo $term->name;
} else { the_title(); } ?>
</h1>
</div>
<div class="flex-col flex-right">
<?php get_flatsome_portfolio_breadcrumbs(); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,28 @@
<div class="page-title portfolio-featured-title featured-title no-overflow">
<div class="page-title-bg">
<div class="title-bg fill bg-fill" data-parallax-container=".page-title" data-parallax-background data-parallax="-4"
<?php if(get_theme_mod('portfolio_archive_bg')) echo 'style="background-image:url('.do_shortcode(get_theme_mod('portfolio_archive_bg')).')"'; ?>>
</div>
<div class="title-overlay fill" style="background-color: rgba(0,0,0,.6)"></div>
</div>
<div class="page-title-inner container flex-row dark">
<div class="flex-col flex-grow">
<?php do_action('flatsome_portfolio_title_left'); ?>
</div>
<div class="flex-col flex-center text-center" data-parallax="-1" data-parallax-fade="true">
<h1 class="entry-title is-xlarge uppercase">
<?php
if(is_tax()){
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
echo $term->name;
} else { the_title(); } ?>
</h1>
<?php do_action('flatsome_portfolio_title_after'); ?>
</div>
<div class="flex-col flex-grow text-right">
<?php do_action('flatsome_portfolio_title_right'); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,13 @@
<div class="page-title">
<div class="page-title-inner container flex-row">
<div class="flex-col flex-grow">
<h1 class="entry-title uppercase mb-0">
<?php
if(is_tax()){
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
echo $term->name;
} else { the_title(); } ?>
</h1>
</div>
</div>
</div>

View File

@@ -0,0 +1,38 @@
<?php get_template_part( 'template-parts/portfolio/archive-portfolio-title', get_theme_mod( 'portfolio_archive_title', '' ) ); ?>
<div id="content" role="main" class="page-wrapper">
<?php
$cat = false;
$filter = get_theme_mod( 'portfolio_archive_filter', 'left' );
$filter_nav = get_theme_mod( 'portfolio_archive_filter_style', 'line-grow' );
if ( $filter == 'disabled' || is_tax() ) $filter = 'disabled';
// Check if category.
if ( is_tax() ) $cat = get_queried_object()->term_id;
// Height.
$height = get_theme_mod( 'portfolio_height', 0 ) ? get_theme_mod( 'portfolio_height', 0 ) : '';
echo flatsome_apply_shortcode( 'ux_portfolio', array(
'image_height' => $height,
'filter' => $filter,
'filter_nav' => $filter_nav,
'type' => 'row',
'cat' => $cat,
'orderby' => get_theme_mod( 'portfolio_archive_orderby', 'menu_order' ),
'order' => get_theme_mod( 'portfolio_archive_order', 'desc' ),
'col_spacing' => get_theme_mod( 'portfolio_archive_spacing', 'small' ),
'columns' => get_theme_mod( 'portfolio_archive_columns', 4 ),
'columns__md' => get_theme_mod( 'portfolio_archive_columns_tablet', 3 ),
'columns__sm' => get_theme_mod( 'portfolio_archive_columns_mobile', 2 ),
'depth' => get_theme_mod( 'portfolio_archive_depth', 0 ),
'depth_hover' => get_theme_mod( 'portfolio_archive_depth_hover', 0 ),
'image_radius' => get_theme_mod( 'portfolio_archive_image_radius', 0 ),
'image_size' => get_theme_mod( 'portfolio_archive_image_size', 'medium' ),
) );
?>
<?php wp_reset_query(); ?>
</div>

View File

@@ -0,0 +1,5 @@
<?php while ( have_posts() ) : the_post(); ?>
<?php if(get_the_content()) {the_content();} else {
the_post_thumbnail('original');
}; ?>
<?php endwhile; wp_reset_query(); // end of the loop. ?>

View File

@@ -0,0 +1,13 @@
<?php if(get_theme_mod('portfolio_next_prev',1) == 0) return; ?>
<div class="row">
<div class="large-12 col pb-0">
<div class="flex-row flex-has-center next-prev-nav bt bb">
<div class="flex-col flex-left text-left">
<?php flatsome_previous_post_link_portfolio(); ?>
</div>
<div class="flex-col flex-right text-right">
<?php flatsome_next_post_link_portfolio(); ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<?php
/**
* Portfolio related
*/
if ( get_theme_mod( 'portfolio_related', 1 ) == 0 ) {
return;
}
$terms = get_the_terms( get_the_ID(), 'featured_item_category' );
$term_id = $terms ? current( $terms )->term_id : '';
$height = get_theme_mod( 'portfolio_height' );
$height = $height ? $height : '';
echo do_shortcode( '<div class="portfolio-related">[ux_portfolio image_height="' . $height . '" class="portfolio-related" exclude="' . get_the_ID() . '" cat="' . $term_id . '"]</div>' );

View File

@@ -0,0 +1,31 @@
<div class="row">
<?php if(!flatsome_option('portfolio_title')) { ?>
<div class="large-4 col col-divided pb-0">
<div class="featured_item_cats breadcrumbs pt-0">
<?php echo get_the_term_list( get_the_ID(), 'featured_item_category', '', '<span class="divider">|</span>', '' ); ?>
</div>
<h1 class="entry-title is-xlarge uppercase"><?php the_title(); ?></h1>
<?php if ( get_theme_mod( 'portfolio_share', 1 ) ) : ?>
<div class="portfolio-share is-small">
<?php echo do_shortcode( '[share style="small"]' ) ?>
</div>
<?php endif; ?>
</div>
<?php } ?>
<div class="col col-fit pb-0">
<?php the_excerpt();?>
<?php if(get_the_term_list( get_the_ID(), 'featured_item_tag')) { ?>
<div class="item-tags is-small uppercase bt pb-half pt-half">
<strong><?php _e('Tags','woocommerce'); ?>:</strong>
<?php echo strip_tags (get_the_term_list( get_the_ID(), 'featured_item_tag', '', ' / ', '' )); ?>
</div>
<?php } ?>
<?php if(flatsome_option('portfolio_title') =='featured') { ?>
<div class="portfolio-share">
<?php echo do_shortcode('[share]')?>
</div>
<?php } ?>
</div>
</div>

View File

@@ -0,0 +1,21 @@
<?php if(!flatsome_option('portfolio_title')) { ?>
<div class="featured_item_cats breadcrumbs mb-half">
<?php echo get_the_term_list( get_the_ID(), 'featured_item_category', '', '<span class="divider">|</span>', '' ); ?>
</div>
<h1 class="entry-title uppercase"><?php the_title(); ?></h1>
<?php } ?>
<?php the_excerpt();?>
<?php if ( get_theme_mod( 'portfolio_share', 1 ) ) : ?>
<div class="portfolio-share">
<?php echo do_shortcode( '[share style="small"]' ) ?>
</div>
<?php endif; ?>
<?php if(get_the_term_list( get_the_ID(), 'featured_item_tag')) { ?>
<div class="item-tags is-small bt pt-half uppercase">
<strong><?php _e('Tags','woocommerce'); ?>:</strong>
<?php echo strip_tags (get_the_term_list( get_the_ID(), 'featured_item_tag', '', ' / ', '' )); ?>
</div>
<?php } ?>

View File

@@ -0,0 +1,10 @@
<div class="page-title normal-title portfolio-breadcrumb-title">
<div class="page-title-inner container flex-row medium-flex-wrap medium-text-center">
<div class="flex-col flex-grow">
<h1 class="entry-title is-larger uppercase pb-0 pt-0 mb-0"><?php the_title(); ?></h1>
</div>
<div class="flex-col flex-right">
<?php get_flatsome_portfolio_breadcrumbs(); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<div class="page-title portfolio-featured-title featured-title no-overflow">
<div class="page-title-bg fill">
<div class="title-bg fill bg-fill" style="background-image: url('<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>');" data-parallax-container=".page-title" data-parallax="-2" data-parallax-background></div>
<div class="title-overlay fill" style="background-color: rgba(0,0,0,.6)"></div>
</div>
<div class="page-title-inner container flex-row dark">
<div class="flex-col flex-center text-center">
<div class="featured_item_cats breadcrumbs pb-0 op-7">
<?php echo get_the_term_list( get_the_ID(), 'featured_item_category', '', ', ', '' ); ?>
</div>
<h1 class="entry-title is-xlarge uppercase"><?php the_title(); ?></h1>
<?php do_action('flatsome_portfolio_title_after'); ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,21 @@
<?php get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title')); ?>
<div class="portfolio-top">
<div class="row page-wrapper">
<div class="large-12 col mb-0 pb-0">
<div class="portfolio-summary entry-summary">
<?php get_template_part('template-parts/portfolio/portfolio-summary','full'); ?>
</div>
</div>
</div>
<div id="portfolio-content" role="main">
<div class="portfolio-inner">
<?php get_template_part('template-parts/portfolio/portfolio-content'); ?>
</div>
</div>
</div>
<div class="portfolio-bottom">
<?php get_template_part('template-parts/portfolio/portfolio-next-prev'); ?>
<?php get_template_part('template-parts/portfolio/portfolio-related'); ?>
</div>

View File

@@ -0,0 +1,23 @@
<?php get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title')); ?>
<div class="portfolio-top">
<div class="row page-wrapper">
<div id="portfolio-content" class="large-12 col" role="main">
<div class="portfolio-summary entry-summary pb">
<?php get_template_part('template-parts/portfolio/portfolio-summary','full'); ?>
</div>
<div class="portfolio-inner">
<?php get_template_part('template-parts/portfolio/portfolio-content'); ?>
</div>
</div>
</div>
</div>
<div class="portfolio-bottom">
<?php get_template_part('template-parts/portfolio/portfolio-next-prev'); ?>
<?php get_template_part('template-parts/portfolio/portfolio-related'); ?>
</div>

View File

@@ -0,0 +1,25 @@
<?php get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title')); ?>
<div class="portfolio-top">
<div class="row">
<div class="large-3 col">
<div class="portfolio-summary entry-summary">
<?php get_template_part('template-parts/portfolio/portfolio-summary'); ?>
</div>
</div>
<div id="portfolio-content" class="large-9 col col-first col-divided" role="main">
<div class="portfolio-inner">
<?php get_template_part('template-parts/portfolio/portfolio-content'); ?>
</div>
</div>
</div>
</div>
<div class="portfolio-bottom">
<?php get_template_part('template-parts/portfolio/portfolio-next-prev'); ?>
<?php get_template_part('template-parts/portfolio/portfolio-related'); ?>
</div>

View File

@@ -0,0 +1,22 @@
<?php get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title')); ?>
<div class="portfolio-top">
<div id="portfolio-content" role="main" class="page-wrapper">
<div class="portfolio-inner">
<?php get_template_part('template-parts/portfolio/portfolio-content'); ?>
</div>
</div>
<div class="row">
<div class="large-12 col">
<div class="portfolio-summary entry-summary">
<?php get_template_part('template-parts/portfolio/portfolio-summary','full'); ?>
</div>
</div>
</div>
</div>
<div class="portfolio-bottom">
<?php get_template_part('template-parts/portfolio/portfolio-next-prev'); ?>
<?php get_template_part('template-parts/portfolio/portfolio-related'); ?>
</div>

View File

@@ -0,0 +1,22 @@
<?php get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title')); ?>
<div class="portfolio-top">
<div class="row page-wrapper">
<div id="portfolio-content" class="large-12 col" role="main">
<div class="portfolio-inner pb">
<?php get_template_part('template-parts/portfolio/portfolio-content'); ?>
</div>
<div class="portfolio-summary entry-summary">
<?php get_template_part('template-parts/portfolio/portfolio-summary','full'); ?>
</div>
</div>
</div>
</div>
<div class="portfolio-bottom">
<?php get_template_part('template-parts/portfolio/portfolio-next-prev'); ?>
<?php get_template_part('template-parts/portfolio/portfolio-related'); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php get_template_part('template-parts/portfolio/portfolio-title', flatsome_option('portfolio_title')); ?>
<div class="portfolio-top">
<div class="page-wrapper row">
<div class="large-3 col col-divided">
<div class="portfolio-summary entry-summary sticky-sidebar">
<?php get_template_part('template-parts/portfolio/portfolio-summary'); ?>
</div>
</div>
<div id="portfolio-content" class="large-9 col" role="main">
<div class="portfolio-inner">
<?php get_template_part('template-parts/portfolio/portfolio-content'); ?>
</div>
</div>
</div>
</div>
<div class="portfolio-bottom">
<?php get_template_part('template-parts/portfolio/portfolio-next-prev'); ?>
<?php get_template_part('template-parts/portfolio/portfolio-related'); ?>
</div>

View File

@@ -0,0 +1,30 @@
<?php if ( have_posts() ) : ?>
<?php
// Create IDS
$ids = array();
while ( have_posts() ) : the_post();
array_push($ids, get_the_ID());
endwhile; // end of the loop.
$ids = implode(',', $ids);
?>
<?php
echo flatsome_apply_shortcode( 'blog_posts', array(
'type' => get_theme_mod( 'blog_style_type', 'masonry' ),
'depth' => get_theme_mod( 'blog_posts_depth', 0 ),
'depth_hover' => get_theme_mod( 'blog_posts_depth_hover', 0 ),
'text_align' => get_theme_mod( 'blog_posts_title_align', 'center' ),
'columns' => '2',
'show_date' => get_theme_mod( 'blog_badge', 1 ) ? 'true' : 'false',
'ids' => $ids,
) );
?>
<?php flatsome_posts_pagination(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/posts/content','none'); ?>
<?php endif; ?>

View File

@@ -0,0 +1,30 @@
<?php if ( have_posts() ) : ?>
<?php
// Create IDS
$ids = array();
while ( have_posts() ) : the_post();
array_push($ids, get_the_ID());
endwhile; // end of the loop.
$ids = implode(',', $ids);
?>
<?php
echo flatsome_apply_shortcode( 'blog_posts', array(
'type' => get_theme_mod( 'blog_style_type', 'masonry' ),
'depth' => get_theme_mod( 'blog_posts_depth', 0 ),
'depth_hover' => get_theme_mod( 'blog_posts_depth_hover', 0 ),
'text_align' => get_theme_mod( 'blog_posts_title_align', 'center' ),
'columns' => '3',
'show_date' => get_theme_mod( 'blog_badge', 1 ) ? 'true' : 'false',
'ids' => $ids,
) );
?>
<?php flatsome_posts_pagination(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/posts/content','none'); ?>
<?php endif; ?>

View File

@@ -0,0 +1,37 @@
<?php if ( have_posts() ) : ?>
<div id="post-list">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="article-inner <?php flatsome_blog_article_classes(); ?>">
<header class="entry-header">
<div class="entry-header-text text-<?php echo get_theme_mod( 'blog_posts_title_align', 'center' );?>">
<?php get_template_part( 'template-parts/posts/partials/entry', 'title'); ?>
</div>
</header>
<?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. ?>
<div class="entry-image-float">
<?php get_template_part( 'template-parts/posts/partials/entry-image', 'default'); ?>
<?php if ( get_theme_mod( 'blog_badge', 1 ) ) get_template_part( 'template-parts/posts/partials/entry', 'post-date' ); ?>
</div>
<?php } ?>
<?php get_template_part('template-parts/posts/content', 'default' ); ?>
<div class="clearfix"></div>
<?php get_template_part('template-parts/posts/partials/entry-footer', 'default' ); ?>
</div>
</article>
<?php endwhile; ?>
<?php flatsome_posts_pagination(); ?>
</div>
<?php else : ?>
<?php get_template_part( 'template-parts/posts/content','none'); ?>
<?php endif; ?>

View File

@@ -0,0 +1,32 @@
<?php if ( have_posts() ) : ?>
<?php
// Create IDS
$ids = array();
while ( have_posts() ) : the_post();
array_push($ids, get_the_ID());
endwhile; // end of the loop.
$ids = implode(',', $ids);
?>
<?php
echo flatsome_apply_shortcode( 'blog_posts', array(
'type' => 'row',
'image_width' => '40',
'depth' => get_theme_mod( 'blog_posts_depth', 0 ),
'depth_hover' => get_theme_mod( 'blog_posts_depth_hover', 0 ),
'text_align' => get_theme_mod( 'blog_posts_title_align', 'center' ),
'style' => 'vertical',
'columns' => '1',
'show_date' => get_theme_mod( 'blog_badge', 1 ) ? 'true' : 'false',
'ids' => $ids,
) );
?>
<?php flatsome_posts_pagination(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/posts/content','none'); ?>
<?php endif; ?>

View File

@@ -0,0 +1,25 @@
<?php if ( have_posts() ) : ?>
<div id="post-list">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="article-inner <?php flatsome_blog_article_classes(); ?>">
<?php get_template_part('template-parts/posts/partials/entry-header', flatsome_option('blog_posts_header_style') ); ?>
<?php get_template_part('template-parts/posts/content', 'default' ); ?>
<?php get_template_part('template-parts/posts/partials/entry-footer', 'default' ); ?>
</div>
</article>
<?php endwhile; ?>
<?php flatsome_posts_pagination(); ?>
</div>
<?php else : ?>
<?php get_template_part( 'template-parts/posts/content','none'); ?>
<?php endif; ?>

View File

@@ -0,0 +1,34 @@
<?php
/**
* Template part for displaying a message that posts cannot be found.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package flatsome
*/
?>
<section class="no-results not-found">
<header class="page-title">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'flatsome' ); ?></h1>
</header>
<div class="page-content">
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'flatsome' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<?php elseif ( is_search() ) : ?>
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'flatsome' ); ?></p>
<?php get_search_form(); ?>
<?php else : ?>
<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'flatsome' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
</section>

View File

@@ -0,0 +1,31 @@
<?php
/**
* Template part for displaying results in search pages.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package flatsome
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php flatsome_posted_on(); ?>
</div>
<?php endif; ?>
</header>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div>
<footer class="entry-footer">
<?php flatsome_entry_footer(); ?>
</footer>
</article>

View File

@@ -0,0 +1,60 @@
<div class="entry-content single-page">
<?php the_content(); ?>
<?php
wp_link_pages();
?>
<?php if ( get_theme_mod( 'blog_share', 1 ) ) {
// SHARE ICONS
echo '<div class="blog-share text-center">';
echo '<div class="is-divider medium"></div>';
echo do_shortcode( '[share]' );
echo '</div>';
} ?>
</div>
<?php if ( get_theme_mod( 'blog_single_footer_meta', 1 ) ) : ?>
<footer class="entry-meta text-<?php echo get_theme_mod( 'blog_posts_title_align', 'center' ); ?>">
<?php
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list( __( ', ', 'flatsome' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'flatsome' ) );
// But this blog has loads of categories so we should probably display them here.
if ( '' != $tag_list ) {
$meta_text = __( 'This entry was posted in %1$s and tagged %2$s.', 'flatsome' );
} else {
$meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'flatsome' );
}
printf( $meta_text, $category_list, $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) );
?>
</footer>
<?php endif; ?>
<?php if ( get_theme_mod( 'blog_author_box', 1 ) ) : ?>
<div class="entry-author author-box">
<div class="flex-row align-top">
<div class="flex-col mr circle">
<div class="blog-author-image">
<?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'flatsome_author_bio_avatar_size', 90 ) ); ?>
</div>
</div>
<div class="flex-col flex-grow">
<h5 class="author-name uppercase pt-half">
<?php the_author_meta( 'display_name' ); ?>
</h5>
<p class="author-desc small"><?php the_author_meta( 'description' ); ?></p>
</div>
</div>
</div>
<?php endif; ?>
<?php if ( get_theme_mod( 'blog_single_next_prev_nav', 1 ) ) :
flatsome_content_nav( 'nav-below' );
endif; ?>

View File

@@ -0,0 +1,16 @@
<div class="entry-content">
<?php if ( flatsome_option('blog_show_excerpt') || is_search()) { ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
<div class="text-<?php echo get_theme_mod( 'blog_posts_title_align', 'center' );?>">
<a class="more-link button primary is-outline is-smaller" href="<?php echo get_the_permalink(); ?>"><?php _e('Continue reading <span class="meta-nav">&rarr;</span>', 'flatsome'); ?></a>
</div>
</div>
<?php } else { ?>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'flatsome' ) ); ?>
<?php
wp_link_pages();
?>
<?php }; ?>
</div>

View File

@@ -0,0 +1,46 @@
<?php
$args = array(
'posts_per_page' => 5,
'post__in' => get_option('sticky_posts'),
'ignore_sticky_posts' => 0
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) : ?>
<?php
// Create IDS
$ids = array();
while ( $the_query->have_posts() ) : $the_query->the_post();
array_push($ids, get_the_ID());
endwhile; // end of the loop.
// Set ids
$ids = implode(',', $ids);
$readmore = __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'flatsome' );
?>
<?php
echo flatsome_apply_shortcode( 'blog_posts', array(
'class' => 'featured-posts mb',
'slider_nav_style' => 'circle',
'style' => 'shade',
'show_category' => 'text',
'text_align' => 'center',
'text_padding' => '5% 15% 5% 15%',
'title_size' => 'xlarge',
'readmore' => $readmore,
'image_height' => intval( get_theme_mod( 'blog_featured_height', 500 ) ) . 'px',
'type' => 'slider-full',
'depth' => get_theme_mod( 'blog_posts_depth', 0 ),
'depth_hover' => get_theme_mod( 'blog_posts_depth_hover', 0 ),
'columns' => '2',
'image_size' => get_theme_mod( 'blog_featured_image_size', 'medium' ),
'show_date' => get_theme_mod( 'blog_badge', 1 ) ? 'true' : 'false',
'ids' => $ids,
) );
?>
<?php endif; ?>

View File

@@ -0,0 +1,31 @@
<?php
do_action('flatsome_before_blog');
?>
<?php if(!is_single() && get_theme_mod('blog_featured', '') == 'top'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<div class="row row-large <?php if(get_theme_mod('blog_layout_divider', 1)) echo 'row-divided ';?>">
<div class="post-sidebar large-3 col">
<?php flatsome_sticky_column_open( 'blog_sticky_sidebar' ); ?>
<?php get_sidebar(); ?>
<?php flatsome_sticky_column_close( 'blog_sticky_sidebar' ); ?>
</div>
<div class="large-9 col medium-col-first">
<?php if(!is_single() && get_theme_mod('blog_featured', '') == 'content'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<?php
if(is_single()){
get_template_part( 'template-parts/posts/single');
comments_template();
} elseif(get_theme_mod('blog_style_archive', '') && (is_archive() || is_search())){
get_template_part( 'template-parts/posts/archive', get_theme_mod('blog_style_archive', '') );
} else{
get_template_part( 'template-parts/posts/archive', get_theme_mod('blog_style', 'normal') );
} ?>
</div>
</div>
<?php
do_action('flatsome_after_blog');
?>

View File

@@ -0,0 +1,31 @@
<?php
do_action('flatsome_before_blog');
?>
<?php if(!is_single() && flatsome_option('blog_featured') == 'top'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<div class="row row-large <?php if(flatsome_option('blog_layout_divider')) echo 'row-divided ';?>">
<div class="large-9 col">
<?php if(!is_single() && flatsome_option('blog_featured') == 'content'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<?php
if(is_single()){
get_template_part( 'template-parts/posts/single');
comments_template();
} elseif(flatsome_option('blog_style_archive') && (is_archive() || is_search())){
get_template_part( 'template-parts/posts/archive', flatsome_option('blog_style_archive') );
} else {
get_template_part( 'template-parts/posts/archive', flatsome_option('blog_style') );
}
?>
</div>
<div class="post-sidebar large-3 col">
<?php flatsome_sticky_column_open( 'blog_sticky_sidebar' ); ?>
<?php get_sidebar(); ?>
<?php flatsome_sticky_column_close( 'blog_sticky_sidebar' ); ?>
</div>
</div>
<?php
do_action('flatsome_after_blog');
?>

View File

@@ -0,0 +1,24 @@
<?php
do_action('flatsome_before_blog');
?>
<?php if(!is_single() && get_theme_mod('blog_featured', '') == 'top'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<div class="row align-center">
<div class="large-10 col">
<?php if(!is_single() && get_theme_mod('blog_featured', '') == 'content'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<?php
if(is_single()){
get_template_part( 'template-parts/posts/single');
comments_template();
} elseif(get_theme_mod('blog_style_archive', '') && (is_archive() || is_search())){
get_template_part( 'template-parts/posts/archive', get_theme_mod('blog_style_archive', '') );
} else{
get_template_part( 'template-parts/posts/archive', get_theme_mod('blog_style', 'normal') );
}
?>
</div>
</div>
<?php do_action('flatsome_after_blog');

View File

@@ -0,0 +1,33 @@
<div class="box">
<a href="<?php the_permalink() ?>" class="plain">
<div class="box-image rectangle">
<div class="entry-image-attachment" style="max-height:<?php echo $image_height; ?>;overflow:hidden;">
<?php the_post_thumbnail( 'medium' ); ?>
</div>
</div>
<div class="box-text spacing-medium text-center">
<h5 class="post-title uppercase"><?php the_title(); ?></h5>
<div class="is-divider small"></div>
<?php if ( $excerpt != 'false' ) { ?>
<p class="from_the_blog_excerpt small-font show-next">
<?php
$excerpt = get_the_excerpt();
$excerpt_more = apply_filters( 'excerpt_more', ' [...]' );
echo flatsome_string_limit_words( $excerpt, 15 ) . $excerpt_more;
?>
</p>
<?php } ?>
<p class="from_the_blog_comments uppercase xxsmall">
<?php
$comments_number = get_comments_number( get_the_ID() );
printf( _n( '%1$s Comment', '%1$s Comments', $comments_number, 'flatsome' ),
number_format_i18n( $comments_number )
);
?>
</p>
</div>
</a>
<?php if ( $show_date != 'false' ) { ?>
<?php get_template_part( 'template-parts/posts/partials/entry', 'date-box' ); ?>
<?php } ?>
</div>

View File

@@ -0,0 +1,77 @@
<header class="archive-page-header">
<div class="row">
<div class="large-12 text-center col">
<h1 class="page-title is-large uppercase">
<?php
if ( is_category() ) :
printf( __( 'Category Archives: %s', 'flatsome' ), '<span>' . single_cat_title( '', false ) . '</span>' );
elseif ( is_tag() ) :
printf( __( 'Tag Archives: %s', 'flatsome' ), '<span>' . single_tag_title( '', false ) . '</span>' );
elseif ( is_search() ) :
printf( __( 'Search Results for: %s', 'flatsome' ), '<span>' . get_search_query() . '</span>' );
elseif ( is_author() ) :
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*/
the_post();
printf( __( 'Author Archives: %s', 'flatsome' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
elseif ( is_day() ) :
printf( __( 'Daily Archives: %s', 'flatsome' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: %s', 'flatsome' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: %s', 'flatsome' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
_e( 'Asides', 'flatsome' );
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
_e( 'Images', 'flatsome');
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
_e( 'Videos', 'flatsome' );
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
_e( 'Quotes', 'flatsome' );
elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
_e( 'Links', 'flatsome' );
else :
_e( '', 'flatsome' );
endif;
?>
</h1>
<?php
if ( is_category() ) :
// show an optional category description
$category_description = category_description();
if ( ! empty( $category_description ) ) :
echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
endif;
elseif ( is_tag() ) :
// show an optional tag description
$tag_description = tag_description();
if ( ! empty( $tag_description ) ) :
echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
endif;
endif;
?>
</div>
</div>
</header>

View File

@@ -0,0 +1,26 @@
<footer class="entry-meta clearfix">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'flatsome' ) );
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'flatsome' ), $categories_list ); ?>
</span>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'flatsome' ) );
if ( $tags_list ) :
?>
<span class="sep"> | </span>
<span class="tags-links">
<?php printf( __( 'Tagged %1$s', 'flatsome' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link pull-right"><?php comments_popup_link( __( 'Leave a comment', 'flatsome' ), __( '<strong>1</strong> Comment', 'flatsome' ), __( '<strong>%</strong> Comments', 'flatsome' ) ); ?></span>
<?php endif; ?>
</footer>

View File

@@ -0,0 +1,26 @@
<footer class="entry-meta clearfix">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'flatsome' ) );
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'flatsome' ), $categories_list ); ?>
</span>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'flatsome' ) );
if ( $tags_list ) :
?>
<span class="sep">&nbsp;|&nbsp;</span>
<span class="tags-links">
<?php printf( __( 'Tagged %1$s', 'flatsome' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link pull-right"><?php comments_popup_link( __( 'Leave a comment', 'flatsome' ), __( '<strong>1</strong> Comment', 'flatsome' ), __( '<strong>%</strong> Comments', 'flatsome' ) ); ?></span>
<?php endif; ?>
</footer>

View File

@@ -0,0 +1,14 @@
<header class="entry-header">
<?php if ( has_post_thumbnail() ) : ?>
<?php if ( ! is_single() || ( is_single() && get_theme_mod( 'blog_single_featured_image', 1 ) ) ) : ?>
<div class="entry-image relative">
<?php get_template_part( 'template-parts/posts/partials/entry-image', 'default' ); ?>
<?php if ( get_theme_mod( 'blog_badge', 1 ) ) get_template_part( 'template-parts/posts/partials/entry', 'post-date' ); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="entry-header-text entry-header-text-bottom text-<?php echo get_theme_mod( 'blog_posts_title_align', 'center' ); ?>">
<?php get_template_part( 'template-parts/posts/partials/entry', 'title' ); ?>
</div>
</header>

View File

@@ -0,0 +1,13 @@
<header class="entry-header">
<div class="entry-header-text entry-header-text-top text-<?php echo get_theme_mod( 'blog_posts_title_align', 'center' ); ?>">
<?php get_template_part( 'template-parts/posts/partials/entry', 'title' ); ?>
</div>
<?php if ( has_post_thumbnail() ) : ?>
<?php if ( ! is_single() || ( is_single() && get_theme_mod( 'blog_single_featured_image', 1 ) ) ) : ?>
<div class="entry-image relative">
<?php get_template_part( 'template-parts/posts/partials/entry-image', 'default' ); ?>
<?php if ( get_theme_mod( 'blog_badge', 1 ) ) get_template_part( 'template-parts/posts/partials/entry', 'post-date' ); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</header>

View File

@@ -0,0 +1,3 @@
<a href="<?php the_permalink();?>">
<?php the_post_thumbnail('large'); ?>
</a>

View File

@@ -0,0 +1,6 @@
<div class="badge absolute top post-date badge-<?php echo flatsome_option('blog_badge_style'); ?>">
<div class="badge-inner">
<span class="post-date-day"><?php echo get_the_time('d', get_the_ID()); ?></span><br>
<span class="post-date-month is-small"><?php echo get_the_time('M', get_the_ID()); ?></span>
</div>
</div>

View File

@@ -0,0 +1,25 @@
<h6 class="entry-category is-xsmall">
<?php echo get_the_category_list( __( ', ', 'flatsome' ) ) ?>
</h6>
<?php
if ( is_single() ) {
echo '<h1 class="entry-title">' . get_the_title() . '</h1>';
} else {
echo '<h2 class="entry-title"><a href="' . get_the_permalink() . '" rel="bookmark" class="plain">' . get_the_title() . '</a></h2>';
}
?>
<div class="entry-divider is-divider small"></div>
<?php
$single_post = is_singular( 'post' );
if ( $single_post && get_theme_mod( 'blog_single_header_meta', 1 ) ) : ?>
<div class="entry-meta uppercase is-xsmall">
<?php flatsome_posted_on(); ?>
</div>
<?php elseif ( ! $single_post && 'post' == get_post_type() ) : ?>
<div class="entry-meta uppercase is-xsmall">
<?php flatsome_posted_on(); ?>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,3 @@
<a href="<?php the_permalink();?>">
<?php the_post_thumbnail('large'); ?>
</a>

View File

@@ -0,0 +1,17 @@
<?php while ( have_posts() ) : the_post(); ?>
<div class="page-title blog-featured-title featured-title no-overflow">
<div class="page-title-bg fill">
<?php if ( has_post_thumbnail() && get_theme_mod( 'blog_single_featured_image', 1 ) ) { // check if the post has a Post Thumbnail assigned to it. ?>
<div class="title-bg fill bg-fill bg-top" style="background-image: url('<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'large'); ?>');" data-parallax-fade="true" data-parallax="-2" data-parallax-background data-parallax-container=".page-title"></div>
<?php } ?>
<div class="title-overlay fill" style="background-color: rgba(0,0,0,.5)"></div>
</div>
<div class="page-title-inner container flex-row dark is-large" style="min-height: 300px">
<div class="flex-col flex-center text-center">
<?php get_template_part( 'template-parts/posts/partials/entry', 'title'); ?>
</div>
</div>
</div>
<?php endwhile; ?>

View File

@@ -0,0 +1,24 @@
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="article-inner <?php flatsome_blog_article_classes(); ?>">
<?php
if(flatsome_option('blog_post_style') == 'default' || flatsome_option('blog_post_style') == 'inline'){
get_template_part('template-parts/posts/partials/entry-header', flatsome_option('blog_posts_header_style') );
}
?>
<?php get_template_part( 'template-parts/posts/content', 'single' ); ?>
</div>
</article>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>

View File

@@ -0,0 +1,5 @@
<a <?php echo $attributes; ?> <?php echo $styles; ?>>
<?php echo $icon_left; ?>
<span><?php echo $text; ?></span>
<?php echo $icon_right; ?>
</a>