Updated for public server.
This commit is contained in:
46
wp-content/themes/shopire/template-parts/content-none.php
Normal file
46
wp-content/themes/shopire/template-parts/content-none.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying a message that posts cannot be found.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Shopire
|
||||
*/
|
||||
|
||||
?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class('wf__post wf-mb-4'); ?>>
|
||||
<div class="wf__post-entry">
|
||||
<?php
|
||||
if ( is_home() && current_user_can( 'publish_posts' ) ) :
|
||||
|
||||
printf(
|
||||
'<p>' . wp_kses(
|
||||
/* translators: 1: link to WP admin new post page. */
|
||||
__( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'shopire' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
) . '</p>',
|
||||
esc_url( admin_url( 'post-new.php' ) )
|
||||
);
|
||||
|
||||
elseif ( is_search() ) :
|
||||
?>
|
||||
|
||||
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'shopire' ); ?></p>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
else :
|
||||
?>
|
||||
|
||||
<p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'shopire' ); ?></p>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
125
wp-content/themes/shopire/template-parts/content-page.php
Normal file
125
wp-content/themes/shopire/template-parts/content-page.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying page content in page.php.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Shopire
|
||||
*/
|
||||
$shopire_enable_post_excerpt = get_theme_mod('shopire_enable_post_excerpt','1');
|
||||
$shopire_enable_post_cat = get_theme_mod('shopire_enable_post_cat','1');
|
||||
$shopire_enable_post_date = get_theme_mod('shopire_enable_post_date','1');
|
||||
$shopire_enable_post_author = get_theme_mod('shopire_enable_post_author','1');
|
||||
$shopire_enable_post_comments = get_theme_mod('shopire_enable_post_comments','1');
|
||||
$shopire_enable_post_views = get_theme_mod('shopire_enable_post_views');
|
||||
$shopire_enable_post_rt = get_theme_mod('shopire_enable_post_rt');
|
||||
$shopire_enable_post_tag = get_theme_mod('shopire_enable_post_tag');
|
||||
$shopire_enable_post_ttl = get_theme_mod('shopire_enable_post_ttl','1');
|
||||
$shopire_enable_post_social = get_theme_mod('shopire_enable_post_social');
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class('wf_post_item wf_posts--one wf-mb-4'); ?>>
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<div class="image">
|
||||
<?php if($shopire_enable_post_date=='1'): ?>
|
||||
<div class="date">
|
||||
<span class="day"><?php echo esc_html(get_the_date( 'j' )); ?></span>
|
||||
<span class="month"><?php echo esc_html(get_the_date( 'F' )); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php the_post_thumbnail(); ?>
|
||||
<a href="<?php echo esc_url( get_permalink() ); ?>"><span class="link"><span></span></span></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="inner">
|
||||
<?php if($shopire_enable_post_cat=='1'): ?>
|
||||
<div class="catetag">
|
||||
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="category tag"><?php the_category(' , '); ?></a>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
if($shopire_enable_post_ttl=='1'):
|
||||
if ( is_single() ) :
|
||||
|
||||
the_title('<h5 class="title">', '</h5>' );
|
||||
|
||||
else:
|
||||
|
||||
the_title( sprintf( '<h5 class="title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h5>' );
|
||||
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
<div class="meta">
|
||||
<ul>
|
||||
<?php if($shopire_enable_post_author=='1'): ?>
|
||||
<li>
|
||||
<div class="author">
|
||||
<img src="<?php echo esc_url( get_avatar_url( absint(get_the_author_meta( 'ID' )) ) ); ?>" width="90" height="90" alt="<?php esc_attr(the_author()); ?>" class="avatar">
|
||||
<a href="<?php echo esc_url(get_author_posts_url( absint(get_the_author_meta( 'ID' )) ));?>"><span><?php esc_html(the_author()); ?></span></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($shopire_enable_post_comments=='1'): ?>
|
||||
<li>
|
||||
<div class="reply">
|
||||
<a href="<?php echo esc_url( get_permalink() ); ?>">
|
||||
<i class="far fa-message" aria-hidden="true"></i>
|
||||
<span class="count"><?php echo esc_html(get_comments_number($post->ID)); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($shopire_enable_post_views=='1'): ?>
|
||||
<li><i class="far fa-eye"></i> <?php echo wp_kses_post(shopire_get_post_view(get_the_ID())); ?></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($shopire_enable_post_rt=='1'): ?>
|
||||
<li><i class="fa-solid fa-eye"></i> <?php echo esc_html(shopire_read_time()); ?></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($shopire_enable_post_tag=='1'): ?>
|
||||
<li>
|
||||
<i class="fa-solid fa-tag"></i>
|
||||
<?php
|
||||
$posttags = get_tags();
|
||||
if($posttags):
|
||||
foreach($posttags as $index=>$tag){
|
||||
echo '<a href="'.esc_url(get_tag_link($tag->term_id)).'">' .esc_html($tag->name). '</a>, ';
|
||||
if($index>7){break;}
|
||||
}
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($shopire_enable_post_social=='1'): ?>
|
||||
<li>
|
||||
<?php do_action('shopire_post_sharing'); ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content clear">
|
||||
<?php
|
||||
if($shopire_enable_post_excerpt == '1' && !is_single()):
|
||||
|
||||
the_excerpt();
|
||||
if ( function_exists( 'shopire_execerpt_btn' ) ) : shopire_execerpt_btn(); endif;
|
||||
|
||||
else:
|
||||
|
||||
the_content(
|
||||
sprintf(
|
||||
__( 'Read More', 'shopire' ),
|
||||
'<span class="screen-reader-text"> '.esc_html(get_the_title()).'</span>'
|
||||
)
|
||||
);
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
34
wp-content/themes/shopire/template-parts/content.php
Normal file
34
wp-content/themes/shopire/template-parts/content.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Shopire
|
||||
*/
|
||||
|
||||
?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class('wf_post_item wf_posts--one wf-mb-4'); ?>>
|
||||
<div class="inner">
|
||||
<?php
|
||||
if ( is_single() ) {
|
||||
the_title( '<h5 class="title">', '</h5>' );
|
||||
} else {
|
||||
the_title( '<h5 class="title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h5>' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
the_content( sprintf(
|
||||
/* translators: %s: Name of current post. */
|
||||
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'shopire' ), array( 'span' => array( 'class' => array() ) ) ),
|
||||
the_title( '<span class="screen-reader-text">"', '"</span>', false )
|
||||
) );
|
||||
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'shopire' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
30
wp-content/themes/shopire/template-parts/site-breadcrumb.php
Normal file
30
wp-content/themes/shopire/template-parts/site-breadcrumb.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
$shopire_hs_site_breadcrumb = get_theme_mod('shopire_hs_site_breadcrumb','1');
|
||||
$shopire_breadcrumb_type = get_theme_mod('shopire_breadcrumb_type','theme');
|
||||
if($shopire_hs_site_breadcrumb == '1'):
|
||||
?>
|
||||
<section id="wf_pagetitle" class="wf_pagetitle wf-text-center">
|
||||
<div class="wf-container">
|
||||
<div class="wf_pagetitle_content">
|
||||
<?php if($shopire_breadcrumb_type == 'yoast' && (function_exists('yoast_breadcrumb'))): yoast_breadcrumb(); ?>
|
||||
<?php elseif($shopire_breadcrumb_type == 'rankmath' && (function_exists('rank_math_the_breadcrumbs'))): rank_math_the_breadcrumbs(); ?>
|
||||
<?php elseif($shopire_breadcrumb_type == 'navxt' && (function_exists('bcn_display'))): bcn_display(); else: ?>
|
||||
<div class="title">
|
||||
<?php
|
||||
if(is_home() || is_front_page()) {
|
||||
echo '<h2>'; echo single_post_title(); echo '</h2>';
|
||||
} else {
|
||||
shopire_theme_page_header_title();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<ul class="wf_pagetitle_breadcrumb">
|
||||
<?php shopire_page_header_breadcrumbs(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="patterns-layer pattern_1"></div>
|
||||
<div class="patterns-layer pattern_2"></div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
137
wp-content/themes/shopire/template-parts/site-header.php
Normal file
137
wp-content/themes/shopire/template-parts/site-header.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php do_action('shopire_site_preloader'); ?>
|
||||
<?php do_action('shopire_wp_hdr_image'); ?>
|
||||
<?php
|
||||
$shopire_hs_hdr_sticky = get_theme_mod( 'shopire_hs_hdr_sticky','1');
|
||||
$shopire_hs_hdr_bcat = get_theme_mod( 'shopire_hs_hdr_bcat','1');
|
||||
?>
|
||||
<header id="wf_header" class="wf_header header--one">
|
||||
<div class="wf_header-inner">
|
||||
<div class="wf_header-topbar wf-d-lg-block wf-d-none">
|
||||
<?php do_action('shopire_site_header'); ?>
|
||||
</div>
|
||||
<div class="wf_header-navwrapper">
|
||||
<div class="wf_header-navwrapperinner">
|
||||
<!--=== / Start: WF_Navbar / === -->
|
||||
<div class="wf_navbar wf-d-none wf-d-lg-block">
|
||||
<div class="wf_navbar-wrapper <?php if($shopire_hs_hdr_sticky=='1'): esc_attr_e('is--sticky','shopire'); endif; ?>">
|
||||
<div class="wf-container">
|
||||
<div class="wf-row align-items-center">
|
||||
<div class="wf-col-2">
|
||||
<div class="site--logo">
|
||||
<?php do_action('shopire_site_logo'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-col-10">
|
||||
<div class="wf_navbar-menu">
|
||||
<nav class="wf_navbar-nav">
|
||||
<?php do_action('shopire_site_header_navigation'); ?>
|
||||
</nav>
|
||||
<div class="wf_navbar-right">
|
||||
<ul class="wf_navbar-list-right">
|
||||
<?php do_action('shopire_hdr_account'); ?>
|
||||
<?php do_action('shopire_hdr_side_docker'); ?>
|
||||
<?php do_action('shopire_header_button'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-row align-items-center">
|
||||
<?php if(class_exists( 'woocommerce' )): ?>
|
||||
<div class="wf-col-lg-3 wf-col-12">
|
||||
<?php do_action('shopire_header_bcat'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="wf-col-lg-<?php if(!class_exists( 'woocommerce' )): esc_attr_e('9','shopire'); else: esc_attr_e('6','shopire'); endif; ?> wf-col-12">
|
||||
<?php do_action('shopire_hdr_product_search'); ?>
|
||||
</div>
|
||||
<div class="wf-col-lg-3 wf-col-12">
|
||||
<div class="wf_navbar-right">
|
||||
<ul class="wf_navbar-list-right">
|
||||
<?php do_action('shopire_header_contact'); ?>
|
||||
<?php do_action('shopire_woo_cart'); ?>
|
||||
<?php do_action('shopire_hcompare'); ?>
|
||||
<?php do_action('shopire_hwishlist'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--=== / End: WF_Navbar / === -->
|
||||
<!--=== / Start: WF_Mobile Menu / === -->
|
||||
<div class="wf_mobilenav wf-d-lg-none <?php if($shopire_hs_hdr_sticky=='1'): esc_attr_e('is--sticky','shopire'); endif; ?>">
|
||||
<div class="wf_mobilenav-topbar">
|
||||
<button type="button" class="wf_mobilenav-topbar-toggle"><i class="fas fa-angle-double-down" aria-hidden="true"></i></button>
|
||||
<div class="wf_mobilenav-topbar-content">
|
||||
<div class="wf-container">
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-12">
|
||||
<?php do_action('shopire_site_header'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-container">
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-12">
|
||||
<div class="wf_mobilenav-menu">
|
||||
<div class="wf_mobilenav-mainmenu">
|
||||
<button type="button" class="hamburger wf_mobilenav-mainmenu-toggle">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
<nav class="wf_mobilenav-mainmenu-content">
|
||||
<div class="wf_header-closemenu off--layer"></div>
|
||||
<div class="wf_mobilenav-mainmenu-inner">
|
||||
<button type="button" class="wf_header-closemenu site--close"></button>
|
||||
<div class="wf_mobilenav-mainmenu-wrap">
|
||||
<?php
|
||||
$shopire_hs_hdr_bcat = get_theme_mod( 'shopire_hs_hdr_bcat','1');
|
||||
$shopire_hs_hdr_bcat = get_theme_mod( 'shopire_hs_hdr_bcat','1');
|
||||
$shopire_hdr_bcat_ttl = get_theme_mod( 'shopire_hdr_bcat_ttl','Browse Categories');
|
||||
$shopire_hdr_mobile_nav_ttl = get_theme_mod( 'shopire_hdr_mobile_nav_ttl','Main Menu');
|
||||
if(!empty($shopire_hdr_mobile_nav_ttl) && $shopire_hs_hdr_bcat=='1' && !empty($shopire_hdr_bcat_ttl) && class_exists( 'woocommerce' )):
|
||||
?>
|
||||
<h5 class="title"><?php echo wp_kses_post($shopire_hdr_mobile_nav_ttl);?></h5>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<?php do_action('shopire_site_header_navigation'); ?>
|
||||
<?php
|
||||
if($shopire_hs_hdr_bcat=='1' && !empty($shopire_hdr_bcat_ttl) && class_exists( 'woocommerce' )):
|
||||
?>
|
||||
<h5 class="title"><?php echo wp_kses_post($shopire_hdr_bcat_ttl);?></h5>
|
||||
<?php
|
||||
do_action('shopire_header_bcat_base');
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="wf_mobilenav-logo">
|
||||
<div class="site--logo">
|
||||
<?php do_action('shopire_site_logo'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf_mobilenav-toggles">
|
||||
<div class="wf_mobilenav-right">
|
||||
<ul class="wf_navbar-list-right">
|
||||
<?php do_action('shopire_hdr_account'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--=== / End: WF_Mobile Menu / === -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user