Modularización de GKACHELE SaaS
This commit is contained in:
45
wp-content/themes/chromax/template-parts/content-none.php
Normal file
45
wp-content/themes/chromax/template-parts/content-none.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying a message that posts cannot be found.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Chromax
|
||||
*/
|
||||
?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class('dt__post dt-mb-4'); ?>>
|
||||
<div class="dt__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>.', 'chromax' ),
|
||||
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.', 'chromax' ); ?></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.', 'chromax' ); ?></p>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
122
wp-content/themes/chromax/template-parts/content-page.php
Normal file
122
wp-content/themes/chromax/template-parts/content-page.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying page content in page.php.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Chromax
|
||||
*/
|
||||
$chromax_enable_post_excerpt = get_theme_mod('chromax_enable_post_excerpt','1');
|
||||
$chromax_enable_post_cat = get_theme_mod('chromax_enable_post_cat','1');
|
||||
$chromax_enable_post_date = get_theme_mod('chromax_enable_post_date','1');
|
||||
$chromax_enable_post_author = get_theme_mod('chromax_enable_post_author','1');
|
||||
$chromax_enable_post_comments = get_theme_mod('chromax_enable_post_comments');
|
||||
$chromax_enable_post_views = get_theme_mod('chromax_enable_post_views');
|
||||
$chromax_enable_post_rt = get_theme_mod('chromax_enable_post_rt');
|
||||
$chromax_enable_post_tag = get_theme_mod('chromax_enable_post_tag');
|
||||
$chromax_enable_post_ttl = get_theme_mod('chromax_enable_post_ttl','1');
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class('dt_post_item'); ?>>
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<div class="image">
|
||||
<a href="<?php echo esc_url( get_permalink() ); ?>">
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="inner">
|
||||
<?php if($chromax_enable_post_date=='1'): ?>
|
||||
<div class="meta-up">
|
||||
<div class="date">
|
||||
<?php echo esc_html(get_the_date('d/')); ?><span><?php echo esc_html(get_the_date('m/ Y')); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="meta">
|
||||
<ul>
|
||||
<?php if($chromax_enable_post_author=='1'): ?>
|
||||
<li>
|
||||
<div class="author">
|
||||
<i class="far fa-user" aria-hidden="true"></i>
|
||||
<a href="<?php echo esc_url(get_author_posts_url( get_the_author_meta( 'ID' ) ));?>"><?php esc_html(the_author()); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($chromax_enable_post_comments=='1'): ?>
|
||||
<li>
|
||||
<div class="comments">
|
||||
<i class="far fa-comments" aria-hidden="true"></i>
|
||||
<span><?php echo esc_html(get_comments_number($post->ID)); ?></span>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($chromax_enable_post_cat=='1'): ?>
|
||||
<li>
|
||||
<div class="category">
|
||||
<i class="far fa-tags" aria-hidden="true"></i>
|
||||
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="category tag"><?php the_category(' , '); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($chromax_enable_post_views=='1'): ?>
|
||||
<li><i class="far fa-eye"></i> <?php echo wp_kses_post(chromax_get_post_view(get_the_ID())); ?></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($chromax_enable_post_rt=='1'): ?>
|
||||
<li><i class="fa-solid fa-eye"></i> <?php echo esc_html(chromax_read_time()); ?></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($chromax_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; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
if($chromax_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="content">
|
||||
<?php
|
||||
if($chromax_enable_post_excerpt == '1' && !is_single()):
|
||||
|
||||
the_excerpt();
|
||||
if ( function_exists( 'chromax_execerpt_btn' ) ) : chromax_execerpt_btn(); endif;
|
||||
|
||||
else:
|
||||
|
||||
the_content(
|
||||
sprintf(
|
||||
__( 'Read More', 'chromax' ),
|
||||
'<span class="screen-reader-text"> '.esc_html(get_the_title()).'</span>'
|
||||
)
|
||||
);
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
33
wp-content/themes/chromax/template-parts/content.php
Normal file
33
wp-content/themes/chromax/template-parts/content.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Chromax
|
||||
*/
|
||||
?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class('dt_post_item dt-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>', 'chromax' ), 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:', 'chromax' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
38
wp-content/themes/chromax/template-parts/site-breadcrumb.php
Normal file
38
wp-content/themes/chromax/template-parts/site-breadcrumb.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
$chromax_hs_site_breadcrumb = get_theme_mod('chromax_hs_site_breadcrumb','1');
|
||||
$chromax_breadcrumb_bg_img = get_theme_mod('chromax_breadcrumb_bg_img',esc_url(get_template_directory_uri() .'/assets/images/pagetitle.jpg'));
|
||||
$chromax_breadcrumb_type = get_theme_mod('chromax_breadcrumb_type','theme');
|
||||
if($chromax_hs_site_breadcrumb == '1'):
|
||||
?>
|
||||
<section id="dt_pagetitle" class="dt_pagetitle dt-text-center">
|
||||
<?php if($chromax_breadcrumb_type == 'yoast' && (function_exists('yoast_breadcrumb'))): yoast_breadcrumb(); ?>
|
||||
<?php elseif($chromax_breadcrumb_type == 'rankmath' && (function_exists('rank_math_the_breadcrumbs'))): rank_math_the_breadcrumbs(); ?>
|
||||
<?php elseif($chromax_breadcrumb_type == 'navxt' && (function_exists('bcn_display'))): bcn_display(); else: ?>
|
||||
<?php
|
||||
echo '<div class="dt_pagetitle_bigtitle">'; echo single_post_title(); echo '</div>';
|
||||
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<div class="dt_pagetitle_bgimage" data-background="<?php echo esc_url($chromax_breadcrumb_bg_img); ?>"></div>
|
||||
<div class="dt-container">
|
||||
<div class="dt_pagetitle_content">
|
||||
<?php if($chromax_breadcrumb_type == 'yoast' && (function_exists('yoast_breadcrumb'))): yoast_breadcrumb(); ?>
|
||||
<?php elseif($chromax_breadcrumb_type == 'rankmath' && (function_exists('rank_math_the_breadcrumbs'))): rank_math_the_breadcrumbs(); ?>
|
||||
<?php elseif($chromax_breadcrumb_type == 'navxt' && (function_exists('bcn_display'))): bcn_display(); else: ?>
|
||||
<div class="title">
|
||||
<?php
|
||||
if(is_home() || is_front_page()) {
|
||||
echo '<h1>'; echo single_post_title(); echo '</h1>';
|
||||
} else {
|
||||
chromax_theme_page_header_title();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<ul class="dt_pagetitle_breadcrumb">
|
||||
<?php chromax_page_header_breadcrumbs(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
99
wp-content/themes/chromax/template-parts/site-header.php
Normal file
99
wp-content/themes/chromax/template-parts/site-header.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php do_action('chromax_site_preloader'); ?>
|
||||
<?php do_action('chromax_wp_hdr_image'); ?>
|
||||
<?php
|
||||
$chromax_hs_hdr_sticky = get_theme_mod( 'chromax_hs_hdr_sticky','1');
|
||||
?>
|
||||
<header id="dt_header" class="dt_header header--one">
|
||||
<div class="dt_header-inner">
|
||||
<div class="dt_header-topbar dt-d-lg-block dt-d-none">
|
||||
<?php do_action('chromax_site_header'); ?>
|
||||
</div>
|
||||
<div class="dt_header-navwrapper">
|
||||
<div class="dt_header-navwrapperinner">
|
||||
<!--=== / Start: DT_Navbar / === -->
|
||||
<div class="dt_navbar dt-d-none dt-d-lg-block">
|
||||
<div class="dt_navbar-wrapper reverse <?php if($chromax_hs_hdr_sticky=='1'): esc_attr_e('is--sticky','chromax'); endif; ?>">
|
||||
<div class="dt-container">
|
||||
<div class="dt-row">
|
||||
<div class="dt-col-2 dt-my-auto">
|
||||
<div class="site--logo">
|
||||
<?php do_action('chromax_site_logo'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dt-col-10 dt-my-auto">
|
||||
<div class="dt_navbar-menu">
|
||||
<nav class="dt_navbar-nav">
|
||||
<?php do_action('chromax_site_header_navigation'); ?>
|
||||
</nav>
|
||||
<div class="dt_navbar-right">
|
||||
<ul class="dt_navbar-list-right">
|
||||
<?php do_action('chromax_hdr_account'); ?>
|
||||
<?php do_action('chromax_woo_cart'); ?>
|
||||
<?php do_action('chromax_site_main_search'); ?>
|
||||
<?php do_action('chromax_header_button'); ?>
|
||||
<?php do_action('chromax_header_contact'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--=== / End: DT_Navbar / === -->
|
||||
<!--=== / Start: DT_Mobile Menu / === -->
|
||||
<div class="dt_mobilenav reverse dt-d-lg-none <?php if($chromax_hs_hdr_sticky=='1'): esc_attr_e('is--sticky','chromax'); endif; ?>">
|
||||
<div class="dt_mobilenav-topbar">
|
||||
<button type="button" class="dt_mobilenav-topbar-toggle"><i class="fas fa-angle-double-down" aria-hidden="true"></i></button>
|
||||
<div class="dt_mobilenav-topbar-content">
|
||||
<div class="dt-container">
|
||||
<div class="dt-row">
|
||||
<div class="dt-col-12">
|
||||
<?php do_action('chromax_site_header'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dt-container">
|
||||
<div class="dt-row">
|
||||
<div class="dt-col-12">
|
||||
<div class="dt_mobilenav-menu">
|
||||
<div class="dt_mobilenav-logo">
|
||||
<div class="site--logo">
|
||||
<?php do_action('chromax_site_logo'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dt_mobilenav-toggles">
|
||||
<div class="dt_mobilenav-right">
|
||||
<ul class="dt_navbar-list-right">
|
||||
<?php do_action('chromax_site_main_search'); ?>
|
||||
<?php do_action('chromax_header_button'); ?>
|
||||
<?php do_action('chromax_header_contact'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dt_mobilenav-mainmenu">
|
||||
<button type="button" class="hamburger dt_mobilenav-mainmenu-toggle">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
<nav class="dt_mobilenav-mainmenu-content">
|
||||
<div class="dt_header-closemenu off--layer"></div>
|
||||
<div class="dt_mobilenav-mainmenu-inner">
|
||||
<button type="button" class="dt_header-closemenu site--close"></button>
|
||||
<?php do_action('chromax_site_header_navigation'); ?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--=== / End: DT_Mobile Menu / === -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user