feat: initial ACRIB WordPress deployment

- WordPress 6.9.4 (es_ES) with Kadence theme
- Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto
- Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold
- Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI)
- Plugins: Kadence Blocks, Polylang, Contact Form 7
- Custom CSS with full brand styling and responsive layout
- HTTPS enforced via wp-config.php proxy detection
This commit is contained in:
Malin
2026-05-19 19:25:59 +02:00
commit f3ff7b7186
6119 changed files with 1984255 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
/**
* Template part for displaying a post's title
*
* @package kadence
*/
namespace Kadence;
$item_type = get_post_type();
$elements = kadence()->option( $item_type . '_archive_title_element_breadcrumb' );
$args = array( 'show_title' => true );
if ( isset( $elements ) && is_array( $elements ) ) {
if ( isset( $elements['show_title'] ) && ! $elements['show_title'] ) {
$args['show_title'] = false;
}
}
kadence()->print_breadcrumb( $args );

View File

@@ -0,0 +1,12 @@
<?php
/**
* Template part for displaying the archive description
*
* @package kadence
*/
namespace Kadence;
if ( apply_filters( 'kadence_show_archive_description', ( is_tax() || is_category() || is_tag() || ( is_archive() && ! is_search() && ! is_post_type_archive( 'product' ) ) ) ) ) {
the_archive_description( '<div class="archive-description">', '</div>' );
}

View File

@@ -0,0 +1,25 @@
<?php
/**
* The template for displaying Heroic Knowledgebase Search
*
* @package kadence
*/
namespace Kadence;
use function hkb_show_knowledgebase_search;
use function hkb_get_knowledgebase_searchbox_placeholder_text;
use function ht_knowledge_base_activate_live_search;
use function get_search_query;
/* important - load live search scripts */ ht_knowledge_base_activate_live_search(); ?>
<form class="hkb-site-search search-form" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label class="hkb-screen-reader-text screen-reader-text" for="s"><?php esc_html_e( 'Search For', 'kadence' ); ?></label>
<input class="hkb-site-search__field search-field" type="text" value="<?php echo get_search_query(); ?>" placeholder="<?php echo esc_attr( hkb_get_knowledgebase_searchbox_placeholder_text() ); ?>" name="s" autocomplete="off">
<input type="hidden" name="ht-kb-search" value="1" />
<?php if ( defined( 'ICL_LANGUAGE_CODE' ) ) { ?>
<input type="hidden" name="lang" value="<?php echo esc_attr( ICL_LANGUAGE_CODE ); ?>"/>
<?php } ?>
<button class="hkb-site-search__button search-submit" type="submit"><span><?php esc_html_e( 'Search', 'kadence' ); ?></span></button>
<div class="kadence-search-icon-wrap"><?php kadence()->print_icon( 'search', '', false ); ?></div>
</form>

View File

@@ -0,0 +1,14 @@
<?php
/**
* Template part for displaying a search.
*
* @package kadence
*/
namespace Kadence;
if ( function_exists( 'is_bbpress' ) && is_bbpress() ) {
bbp_get_template_part( 'form', 'search' );
} else {
get_search_form();
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* Template part for displaying a post's title
*
* @package kadence
*/
namespace Kadence;
if ( is_404() ) {
?>
<h1 class="page-title 404-page-title">
<?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'kadence' ); ?>
</h1>
<?php
} elseif ( is_home() && ! have_posts() ) {
?>
<h1 class="page-title post-home-title archive-title">
<?php esc_html_e( 'Nothing Found', 'kadence' ); ?>
</h1>
<?php
} elseif ( is_home() && ! is_front_page() ) {
?>
<h1 class="page-title post-home-title archive-title">
<?php single_post_title(); ?>
</h1>
<?php
} elseif ( is_search() ) {
?>
<h1 class="page-title search-title">
<?php
printf(
/* translators: %s: search query */
esc_html__( 'Search Results for: %s', 'kadence' ),
'<span>' . get_search_query() . '</span>'
);
?>
</h1>
<?php
} elseif ( is_archive() || is_home() ) {
the_archive_title( '<h1 class="page-title archive-title">', '</h1>' );
}

View File

@@ -0,0 +1,54 @@
<?php
/**
* The main archive template file for inner content.
*
* @package kadence
*/
namespace Kadence;
/**
* Hook for Hero Section
*/
do_action( 'kadence_hero_header' );
?>
<div id="primary" class="content-area">
<div class="content-container site-container">
<div id="main" class="site-main">
<?php
/**
* Hook for anything before main content
*/
do_action( 'kadence_before_main_content' );
if ( kadence()->show_in_content_title() ) {
get_template_part( 'template-parts/content/archive_header' );
}
if ( have_posts() ) {
?>
<ul id="archive-container" class="<?php echo esc_attr( implode( ' ', get_archive_container_classes() ) ); ?>"<?php echo get_archive_infinite_attributes() ? " data-infinite-scroll='" . esc_attr( get_archive_infinite_attributes() ) . "'" : ''; ?>>
<?php
while ( have_posts() ) {
the_post();
/**
* Hook in loop entry template.
*/
do_action( 'kadence_loop_entry' );
}
?>
</ul>
<?php
get_template_part( 'template-parts/content/pagination' );
} else {
get_template_part( 'template-parts/content/error' );
}
/**
* Hook for anything after main content
*/
do_action( 'kadence_after_main_content' );
?>
</div><!-- #main -->
<?php
get_sidebar();
?>
</div>
</div><!-- #primary -->

View File

@@ -0,0 +1,34 @@
<?php
/**
* Template part for displaying the page header of the currently displayed page
*
* @package kadence
*/
namespace Kadence;
$slug = ( is_search() && ! is_post_type_archive( 'product' ) ? 'search' : get_post_type() );
if ( empty( $slug ) ) {
$queried_object = get_queried_object();
if ( is_object( $queried_object ) && property_exists( $queried_object, 'taxonomy' ) ) {
$current_tax = get_taxonomy( $queried_object->taxonomy );
if ( is_object( $current_tax ) && property_exists( $current_tax, 'object_type' ) ) {
$post_types = $current_tax->object_type;
$slug = $post_types[0];
}
}
}
?>
<header class="<?php echo esc_attr( implode( ' ', get_archive_title_classes() ) ); ?>">
<?php
do_action( 'kadence_archive_before_entry_header' );
/**
* Kadence Entry Header
*
* Hooked kadence_entry_header 10
*/
do_action( 'kadence_entry_archive_header', $slug . '_archive', 'normal' );
do_action( 'kadence_archive_after_entry_header' );
?>
</header><!-- .entry-header -->

View File

@@ -0,0 +1,38 @@
<?php
/**
* Template part for displaying a post's Hero header
*
* @package kadence
*/
namespace Kadence;
$slug = ( is_search() && ! is_post_type_archive( 'product' ) ? 'search' : get_post_type() );
if ( empty( $slug ) ) {
$queried_object = get_queried_object();
if ( is_object( $queried_object ) && property_exists( $queried_object, 'taxonomy' ) ) {
$current_tax = get_taxonomy( $queried_object->taxonomy );
if ( property_exists( $current_tax, 'object_type' ) ) {
$post_types = $current_tax->object_type;
$slug = $post_types[0];
}
}
}
?>
<section class="<?php echo esc_attr( implode( ' ', get_archive_hero_classes() ) ); ?>">
<div class="entry-hero-container-inner">
<div class="hero-section-overlay"></div>
<div class="hero-container site-container">
<header class="<?php echo esc_attr( implode( ' ', get_archive_title_classes() ) ); ?>">
<?php
/**
* Kadence Entry Hero
*
* Hooked kadence_entry_archive_header 10
*/
do_action( 'kadence_entry_archive_hero', $slug . '_archive', 'above' );
?>
</header><!-- .entry-header -->
</div>
</div>
</section><!-- .entry-hero -->

View File

@@ -0,0 +1,40 @@
<?php
/**
* Template part for displaying comments list.
*
* @package kadence
*/
namespace Kadence;
?>
<?php
if ( have_comments() ) {
do_action( 'kadence_before_comments_list' );
$title_output = '<h2 class="comments-title">';
$comment_count = (int) get_comments_number();
if ( 1 === $comment_count ) {
$title_output .= esc_html__( 'One Comment', 'kadence' );
} else {
$title_output .= sprintf(
/* translators: 1: comment count number */
esc_html( _nx( '%1$s Comment', '%1$s Comments', $comment_count, 'comments title', 'kadence' ) ),
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
number_format_i18n( $comment_count )
);
}
$title_output .= '</h2><!-- .comments-title -->';
echo wp_kses_post( apply_filters( 'kadence_single_post_comments_title', $title_output ) );
the_comments_navigation();
kadence()->the_comments();
if ( ! comments_open() ) {
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'kadence' ); ?></p>
<?php
}
do_action( 'kadence_after_comments_list' );
}

View File

@@ -0,0 +1,137 @@
<?php
/**
* Template part for displaying a post of post type 'attachment'
*
* @package kadence
*/
namespace Kadence;
if ( ! is_singular( 'attachment' ) ) {
?>
<article <?php post_class( 'entry content-bg loop-entry' ); ?>>
<?php
$defaults = array(
'enabled' => true,
'ratio' => '2-3',
'size' => 'medium_large',
'imageLink' => true,
);
$slug = ( is_search() ? 'search' : get_post_type() );
$feature_element = kadence()->option( $slug . '_archive_element_feature', $defaults );
if ( isset( $feature_element ) && is_array( $feature_element ) && true === $feature_element['enabled'] ) {
$feature_element = wp_parse_args( $feature_element, $defaults );
$ratio = ( isset( $feature_element['ratio'] ) && ! empty( $feature_element['ratio'] ) ? $feature_element['ratio'] : '2-3' );
$size = ( isset( $feature_element['size'] ) && ! empty( $feature_element['size'] ) ? $feature_element['size'] : 'medium_large' );
if ( isset( $feature_element['imageLink'] ) && ! $feature_element['imageLink'] ) {
?>
<div class="post-thumbnail kadence-thumbnail-ratio-<?php echo esc_attr( $ratio ); ?>">
<div class="post-thumbnail-inner">
<?php
echo wp_get_attachment_image(
get_the_ID(),
$size,
false,
array(
'alt' => the_title_attribute(
array(
'echo' => false,
)
),
)
);
?>
</div>
</div><!-- .post-thumbnail -->
<?php
} else {
?>
<a class="post-thumbnail kadence-thumbnail-ratio-<?php echo esc_attr( $ratio ); ?>" href="<?php the_permalink(); ?>">
<div class="post-thumbnail-inner">
<?php
echo wp_get_attachment_image(
get_the_ID(),
$size,
false,
array(
'alt' => the_title_attribute(
array(
'echo' => false,
)
),
)
);
?>
</div>
</a><!-- .post-thumbnail -->
<?php
}
}
?>
<div class="entry-content-wrap">
<?php
/**
* Hook for entry content.
*
* @hooked Kadence\loop_entry_header - 10
* @hooked Kadence\loop_entry_summary - 20
* @hooked Kadence\loop_entry_footer - 30
*/
do_action( 'kadence_loop_entry_content' );
?>
</div>
</article>
<?php
}
if ( is_singular( 'attachment' ) ) {
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'entry' ); ?>>
<?php get_template_part( 'template-parts/content/entry_header', get_post_type() ); ?>
<?php get_template_part( 'template-parts/content/entry_content', get_post_type() ); ?>
<?php get_template_part( 'template-parts/content/entry_footer', get_post_type() ); ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php
}
if ( is_singular( get_post_type() ) ) {
// Show attachment navigation only when the attachment has a parent.
if ( ! empty( $post->post_parent ) ) {
// TODO: There should be a WordPress core function for this, similar to `the_post_navigation()`.
$attachment_navigation = '';
ob_start();
previous_image_link( false );
$prev_link = ob_get_clean();
if ( ! empty( $prev_link ) ) {
$attachment_navigation .= '<div class="nav-previous">';
$attachment_navigation .= '<div class="post-navigation-sub"><span>' . esc_html__( 'Previous:', 'kadence' ) . '</span></div>';
$attachment_navigation .= $prev_link;
$attachment_navigation .= '</div>';
}
ob_start();
next_image_link( false );
$next_link = ob_get_clean();
if ( ! empty( $next_link ) ) {
$attachment_navigation .= '<div class="nav-next">';
$attachment_navigation .= '<div class="post-navigation-sub"><span>' . esc_html__( 'Next:', 'kadence' ) . '</span></div>';
$attachment_navigation .= $next_link;
$attachment_navigation .= '</div>';
}
if ( ! empty( $attachment_navigation ) ) {
echo _navigation_markup( $attachment_navigation, $class = 'post-navigation', __( 'Post navigation', 'kadence' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
// Show comments only when the post type supports it and when comments are open or at least one comment exists.
if ( post_type_supports( get_post_type(), 'comments' ) && ( comments_open() || get_comments_number() ) ) {
comments_template();
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Template part for displaying a post
*
* @package kadence
*/
namespace Kadence;
?>
<article <?php post_class( 'entry content-bg loop-entry' ); ?>>
<?php
/**
* Hook for entry thumbnail.
*
* @hooked Kadence\loop_entry_thumbnail
*/
do_action( 'kadence_loop_entry_thumbnail' );
?>
<div class="entry-content-wrap">
<?php
/**
* Hook for entry content.
*
* @hooked Kadence\loop_entry_header - 10
* @hooked Kadence\loop_entry_summary - 20
* @hooked Kadence\loop_entry_footer - 30
*/
do_action( 'kadence_loop_entry_content' );
?>
</div>
</article>

View File

@@ -0,0 +1,34 @@
<?php
/**
* Template part for displaying a post
*
* @package kadence
*/
namespace Kadence;
?>
<li class="entry-list-item">
<article <?php post_class( 'entry content-bg loop-entry' ); ?>>
<?php
/**
* Hook for entry thumbnail.
*
* @hooked Kadence\loop_entry_thumbnail
*/
do_action( 'kadence_loop_entry_thumbnail' );
?>
<div class="entry-content-wrap">
<?php
/**
* Hook for entry content.
*
* @hooked Kadence\loop_entry_header - 10
* @hooked Kadence\loop_entry_summary - 20
* @hooked Kadence\loop_entry_footer - 30
*/
do_action( 'kadence_loop_entry_content' );
?>
</div>
</article>
</li>

View File

@@ -0,0 +1,36 @@
<?php
/**
* Template part for displaying a post's comment and edit links
*
* @package kadence
*/
namespace Kadence;
$slug = ( is_search() ? 'search' : get_post_type() );
$readmore_element = kadence()->option( $slug . '_archive_element_readmore', array(
'enabled' => true,
'label' => esc_html__( 'Read More', 'kadence' ),
) );
if ( isset( $readmore_element ) && is_array( $readmore_element ) && true === $readmore_element['enabled'] ) {
?>
<div class="entry-actions">
<p class="more-link-wrap">
<a href="<?php the_permalink(); ?>" class="post-more-link">
<?php
echo esc_html( isset( $readmore_element['label'] ) && ! empty( $readmore_element['label'] ) ? $readmore_element['label'] : __( 'Read More', 'kadence' ) );
echo wp_kses(
'<span class="screen-reader-text"> ' . get_the_title() . '</span>',
array(
'span' => array(
'class' => array(),
),
)
);
kadence()->print_icon( 'arrow-right-alt' );
?>
</a>
</p>
</div><!-- .entry-actions -->
<?php
}

View File

@@ -0,0 +1,57 @@
<?php
/**
* Template part for displaying a post's footer
*
* @package kadence
*/
namespace Kadence;
use function Kadence\kadence;
use function get_the_author;
use function get_avatar;
use function get_the_author_meta;
use function the_author_meta;
use function get_the_author_posts_link;
kadence()->print_styles( 'kadence-author-box' );
$social_links_open_new_tab = kadence()->option( 'social_links_open_new_tab' );
?>
<div class="entry-author entry-author-style-<?php echo esc_attr( kadence()->option( 'post_author_box_style' ) ); ?><?php echo kadence()->option( 'post_footer_area_boxed' ) ? ' content-bg entry-content-wrap entry' : ''; ?>">
<div class="entry-author-profile author-profile vcard">
<div class="entry-author-avatar">
<?php echo get_avatar( get_the_author_meta( 'ID' ), 80 ); ?>
</div>
<b class="entry-author-name author-name fn"><?php echo wp_kses_post( kadence()->option( 'post_author_box_link' ) ? get_the_author_posts_link() : get_the_author() ); ?></b>
<?php if ( get_the_author_meta( 'occupation' ) ) { ?>
<p class="entry-author-occupation author-occupation"><?php the_author_meta( 'occupation' ); ?></p>
<?php } ?>
<div class="entry-author-description author-bio">
<?php the_author_meta( 'description' ); ?>
</div>
<div class="entry-author-follow author-follow">
<?php
foreach ( [ 'facebook', 'twitter', 'instagram', 'threads', 'youtube', 'flickr', 'vimeo', 'linkedin', 'pinterest', 'dribbble', 'amazon', 'medium', 'goodreads', 'bookbub' ] as $social ) {
if ( get_the_author_meta( $social ) ) {
$url = get_the_author_meta( $social );
$name = 'twitter' === $social ? 'x formerly Twitter' : $social;
$icon = 'twitter' === $social ? 'twitterAlt2' : $social;
$icon = 'instagram' === $social ? 'instagramAlt' : $icon;
// Might need some special parsing if rank math is active.
if ( defined( 'RANK_MATH_VERSION' ) && ! str_contains( $url, '.com' ) ) {
if ( 'twitter' == $social ) {
$url = 'https://twitter.com/' . $url;
}
}
?>
<a href="<?php echo esc_url( $url ); ?>" class="<?php echo esc_attr( $social ); ?>-link social-button" target="<?php echo esc_attr( $social_links_open_new_tab ? '_blank' : '_self' ); ?>" rel="noopener" title="<?php /* translators: 1: Author Name, 2: Social Media Name */ printf( esc_attr__( 'Follow %1$s on %2$s', 'kadence' ), esc_attr( get_the_author_meta( 'display_name' ) ), esc_attr( ucfirst( $name ) ) ); ?>">
<?php kadence()->print_icon( $icon, '', false ); ?>
</a>
<?php
}
}
?>
</div><!--.author-follow-->
</div>
</div><!-- .entry-author -->

View File

@@ -0,0 +1,39 @@
<?php
/**
* Template part for displaying a post's content
*
* @package kadence
*/
namespace Kadence;
?>
<div class="<?php echo esc_attr( apply_filters( 'kadence_entry_content_class', 'entry-content single-content' ) ); ?>">
<?php
do_action( 'kadence_single_before_entry_content' );
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'kadence' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'kadence' ),
'after' => '</div>',
)
);
do_action( 'kadence_single_after_entry_content' );
?>
</div><!-- .entry-content -->

View File

@@ -0,0 +1,17 @@
<?php
/**
* Template part for displaying a post's footer
*
* @package kadence
*/
namespace Kadence;
?>
<footer class="entry-footer">
<?php
if ( 'post' === get_post_type() && kadence()->option( 'post_tags' ) ) {
get_template_part( 'template-parts/content/entry_tags', get_post_type() );
}
?>
</footer><!-- .entry-footer -->

View File

@@ -0,0 +1,31 @@
<?php
/**
* Template part for displaying a post's header
*
* @package kadence
*/
namespace Kadence;
$classes = array();
$classes[] = 'entry-header';
if ( is_singular( get_post_type() ) ) {
$classes[] = get_post_type() . '-title';
$classes[] = 'title-align-' . ( kadence()->sub_option( get_post_type() . '_title_align', 'desktop' ) ? kadence()->sub_option( get_post_type() . '_title_align', 'desktop' ) : 'inherit' );
$classes[] = 'title-tablet-align-' . ( kadence()->sub_option( get_post_type() . '_title_align', 'tablet' ) ? kadence()->sub_option( get_post_type() . '_title_align', 'tablet' ) : 'inherit' );
$classes[] = 'title-mobile-align-' . ( kadence()->sub_option( get_post_type() . '_title_align', 'mobile' ) ? kadence()->sub_option( get_post_type() . '_title_align', 'mobile' ) : 'inherit' );
}
?>
<header class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
<?php
do_action( 'kadence_single_before_entry_header' );
/**
* Kadence Entry Header
*
* Hooked kadence_entry_header 10
*/
do_action( 'kadence_entry_header', get_post_type(), 'normal' );
do_action( 'kadence_single_after_entry_header' );
?>
</header><!-- .entry-header -->

View File

@@ -0,0 +1,35 @@
<?php
/**
* Template part for displaying a post's Hero header
*
* @package kadence
*/
namespace Kadence;
$classes = array();
$classes[] = 'entry-header';
if ( is_singular( get_post_type() ) ) {
$classes[] = get_post_type() . '-title';
$classes[] = 'title-align-' . ( kadence()->sub_option( get_post_type() . '_title_align', 'desktop' ) ? kadence()->sub_option( get_post_type() . '_title_align', 'desktop' ) : 'inherit' );
$classes[] = 'title-tablet-align-' . ( kadence()->sub_option( get_post_type() . '_title_align', 'tablet' ) ? kadence()->sub_option( get_post_type() . '_title_align', 'tablet' ) : 'inherit' );
$classes[] = 'title-mobile-align-' . ( kadence()->sub_option( get_post_type() . '_title_align', 'mobile' ) ? kadence()->sub_option( get_post_type() . '_title_align', 'mobile' ) : 'inherit' );
}
?>
<section class="entry-hero <?php echo esc_attr( get_post_type() ) . '-hero-section'; ?> <?php echo esc_attr( 'entry-hero-layout-' . kadence()->option( get_post_type() . '_title_inner_layout' ) ); ?>">
<div class="entry-hero-container-inner">
<div class="hero-section-overlay"></div>
<div class="hero-container site-container">
<header class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
<?php
/**
* Kadence Entry Hero
*
* Hooked kadence_entry_header 10
*/
do_action( 'kadence_entry_hero', get_post_type(), 'above' );
?>
</header><!-- .entry-header -->
</div>
</div>
</section><!-- .entry-hero -->

View File

@@ -0,0 +1,15 @@
<?php
/**
* Template part for displaying a post's footer
*
* @package kadence
*/
namespace Kadence;
?>
<footer class="entry-footer">
<?php
get_template_part( 'template-parts/content/entry_actions', get_post_type() );
?>
</footer><!-- .entry-footer -->

View File

@@ -0,0 +1,23 @@
<?php
/**
* Template part for displaying a post's header
*
* @package kadence
*/
namespace Kadence;
?>
<header class="entry-header">
<?php
/**
* Hook for entry header.
*
* @hooked Kadence\loop_entry_taxonomies - 10
* @hooked Kadence\loop_entry_title - 20
* @hooked Kadence\loop_entry_meta - 30
*/
do_action( 'kadence_loop_entry_header' );
?>
</header><!-- .entry-header -->

View File

@@ -0,0 +1,330 @@
<?php
/**
* Template part for displaying a post's metadata
*
* @package kadence
*/
namespace Kadence;
global $post;
$defaults = array(
'id' => 'meta',
'enabled' => false,
'divider' => 'dot',
'author' => true,
'authorLink' => true,
'authorImage' => true,
'authorImageSize' => 25,
'authorEnableLabel' => true,
'authorLabel' => '',
'date' => true,
'dateTime' => false,
'dateEnableLabel' => false,
'dateLabel' => '',
'dateUpdated' => false,
'dateUpdatedTime' => false,
'dateUpdatedDifferent' => false,
'dateUpdatedEnableLabel' => false,
'dateUpdatedLabel' => '',
'categories' => false,
'categoriesEnableLabel' => false,
'categoriesLabel' => '',
'comments' => false,
'commentsCondition' => false,
);
$slug = ( is_search() ? 'search' : get_post_type() );
$elements = kadence()->option( $slug . '_archive_element_meta', $defaults );
$title_meta = array();
$meta_labels = array();
$meta_divider = 'dot';
$author_image = false;
$author_link = true;
$author_image_size = 25;
if ( isset( $elements ) && is_array( $elements ) && isset( $elements['enabled'] ) && false === $elements['enabled'] ) {
return;
}
if ( isset( $elements ) && is_array( $elements ) ) {
$elements = wp_parse_args( $elements, $defaults );
if ( isset( $elements['divider'] ) && $elements['divider'] ) {
$meta_divider = $elements['divider'];
}
if ( isset( $elements['author'] ) && $elements['author'] ) {
$title_meta[] = 'author';
if ( isset( $elements['authorEnableLabel'] ) && $elements['authorEnableLabel'] ) {
$meta_labels['author'] = ( isset( $elements['authorLabel'] ) && ! empty( $elements['authorLabel'] ) ? $elements['authorLabel'] : __( 'By', 'kadence' ) );
}
if ( isset( $elements['authorImage'] ) && $elements['authorImage'] ) {
$author_image = true;
}
if ( isset( $elements['authorLink'] ) && ! $elements['authorLink'] ) {
$author_link = false;
}
if ( isset( $elements['authorImageSize'] ) && $elements['authorImageSize'] ) {
$author_image_size = absint( $elements['authorImageSize'] );
}
}
if ( isset( $elements['date'] ) && $elements['date'] ) {
if ( isset( $elements['dateTime'] ) && $elements['dateTime'] ) {
$title_meta[] = 'dateTime';
} else {
$title_meta[] = 'date';
}
if ( isset( $elements['dateEnableLabel'] ) && $elements['dateEnableLabel'] ) {
$meta_labels['date'] = ( isset( $elements['dateLabel'] ) && ! empty( $elements['dateLabel'] ) ? $elements['dateLabel'] : __( 'Posted on', 'kadence' ) );
}
}
if ( isset( $elements['dateUpdated'] ) && $elements['dateUpdated'] ) {
if ( isset( $elements['dateUpdatedTime'] ) && $elements['dateUpdatedTime'] ) {
$title_meta[] = 'dateUpdatedTime';
} else {
$title_meta[] = 'dateUpdated';
}
if ( isset( $elements['dateUpdatedEnableLabel'] ) && $elements['dateUpdatedEnableLabel'] ) {
$meta_labels['dateUpdated'] = ( isset( $elements['dateUpdatedLabel'] ) && ! empty( $elements['dateUpdatedLabel'] ) ? $elements['dateUpdatedLabel'] : __( 'Updated on', 'kadence' ) );
}
}
if ( isset( $elements['categories'] ) && $elements['categories'] ) {
$title_meta[] = 'categories';
if ( isset( $elements['categoriesEnableLabel'] ) && $elements['categoriesEnableLabel'] ) {
$meta_labels['categories'] = ( isset( $elements['categoriesLabel'] ) && ! empty( $elements['categoriesLabel'] ) ? $elements['categoriesLabel'] : __( 'Posted in', 'kadence' ) );
}
}
if ( isset( $elements['comments'] ) && $elements['comments'] ) {
$title_meta[] = 'comments';
}
}
if ( empty( $title_meta ) ) {
return;
}
$item_id = get_the_ID();
$post_type_obj = get_post_type_object( get_post_type() );
?>
<div class="entry-meta entry-meta-divider-<?php echo esc_attr( $meta_divider ); ?>">
<?php
do_action( 'kadence_before_loop_entry_meta' );
foreach ( $title_meta as $title_meta_item ) {
switch ( $title_meta_item ) {
case 'author':
$author_string = '';
// Show author only if the post type supports it.
if ( post_type_supports( $post_type_obj->name, 'author' ) ) {
$author_id = get_post_field( 'post_author', get_the_ID() );
if ( $author_link ) {
if ( get_the_author_meta( 'url' ) && apply_filters( 'kadence_author_use_profile_link', true ) ) {
$author_string = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_the_author_meta( 'url', $author_id ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
} else {
$author_string = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_author_posts_url( $author_id ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
}
} else {
$author_string = sprintf(
'<span class="author vcard"><span class="fn n">%1$s</span></span>',
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
}
}
if ( ! empty( $author_string ) ) {
$author_output = '<span class="posted-by">';
if ( $author_image ) {
$author_output .= '<span class="author-avatar"' . ( $author_image_size && 25 !== $author_image_size ? ' style="width:' . esc_attr( $author_image_size ) . 'px; height:' . esc_attr( $author_image_size ) . 'px;"' : '' ) .'>';
if ( $author_link ) {
if ( get_the_author_meta( 'url' ) && apply_filters( 'kadence_author_use_profile_link', true ) ) {
$author_output .= sprintf(
'<a class="author-image" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( get_the_author_meta( 'url', $author_id ) ),
esc_attr__( 'Author image', 'kadence' ),
get_avatar( $author_id, ( 2 * $author_image_size ) )
);
} else {
$author_output .= sprintf(
'<a class="author-image" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( get_author_posts_url( $author_id ) ),
esc_attr__( 'Author image', 'kadence' ),
get_avatar( $author_id, $author_image_size )
);
}
} else {
$author_output .= sprintf(
'<span class="author-image">%1$s</span>',
get_avatar( $author_id, $author_image_size )
);
}
$author_output .= '<span class="image-size-ratio"></span>';
$author_output .= '</span>';
}
if ( isset( $meta_labels['author'] ) ) {
$author_output .= '<span class="meta-label">' . esc_html( $meta_labels['author'] ) . '</span>';
}
$author_output .= $author_string;
$author_output .= '</span>';
echo apply_filters( 'kadence_author_meta_output', $author_output ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
break;
case 'date':
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time><time class="updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
if ( ! empty( $time_string ) ) {
?>
<span class="posted-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['date'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['date'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateTime':
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s %3$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s %3$s</time><time class="updated" datetime="%4$s" itemprop="dateModified">%5$s %6$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_html( get_the_time() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
esc_html( get_the_modified_time() )
);
if ( ! empty( $time_string ) ) {
?>
<span class="posted-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['date'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['date'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateUpdated':
if ( isset( $elements['dateUpdatedDifferent'] ) && $elements['dateUpdatedDifferent'] && get_the_date() === get_the_modified_date() ) {
$time_string = '';
} else {
$time_string = sprintf(
'<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s</time>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
}
if ( ! empty( $time_string ) ) {
?>
<span class="updated-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['dateUpdated'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['dateUpdated'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateUpdatedTime':
$publish_time = get_the_time( 'U' ) + ( 60 * 5 );
if ( isset( $elements['dateUpdatedDifferent'] ) && $elements['dateUpdatedDifferent'] && $publish_time > get_the_modified_time( 'U' ) ) {
$time_string = '';
} else {
$time_string = sprintf(
'<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s %3$s</time>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
esc_html( get_the_modified_time() )
);
}
if ( ! empty( $time_string ) ) {
?>
<span class="updated-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['dateUpdated'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['dateUpdated'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'categories':
if ( has_term( '', 'category' ) ) {
/* translators: separator between taxonomy terms */
$separator = _x( ', ', 'list item separator', 'kadence' );
?>
<span class="category-links">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'folder', '', false );
}
if ( isset( $meta_labels['categories'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['categories'] ) . '</span>';
}
echo '<span class="category-link-items">' . get_the_category_list( esc_html( $separator ), '', get_the_ID() ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'comments':
$show = true;
if ( isset( $elements['commentsCondition'] ) && $elements['commentsCondition'] && 0 == get_comments_number() ) {
$show = false;
}
if ( $show ) {
echo '<div class="meta-comments">';
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'commentsAlt', '', false );
}
echo '<a class="meta-comments-link anchor-scroll" href="' . esc_url( get_the_permalink() ) . '#comments">';
if ( '1' === get_comments_number() ) {
echo esc_html( get_comments_number() ) . ' ' . esc_html__( 'Comment', 'kadence' );
} else {
echo esc_html( get_comments_number() ) . ' ' . esc_html__( 'Comments', 'kadence' );
}
echo '</a>';
echo '</div>';
}
break;
}
}
do_action( 'kadence_after_loop_entry_meta' );
?>
</div><!-- .entry-meta -->
<?php

View File

@@ -0,0 +1,87 @@
<?php
/**
* Template part for displaying a post's category terms
*
* @package kadence
*/
namespace Kadence;
$slug = ( is_search() ? 'search' : get_post_type() );
$elements = kadence()->option( $slug . '_archive_element_categories' );
if ( isset( $elements ) && is_array( $elements ) && true === $elements['enabled'] ) {
$tax_slug = ( isset( $elements['taxonomy'] ) && ! empty( $elements['taxonomy'] ) ? $elements['taxonomy'] : 'category' );
if ( has_term( '', $tax_slug ) ) {
$divider = ( isset( $elements['divider'] ) && ! empty( $elements['divider'] ) ? $elements['divider'] : 'vline' );
$style = ( isset( $elements['style'] ) && ! empty( $elements['style'] ) ? $elements['style'] : 'normal' );
switch ( $divider ) {
case 'dot':
$separator = ' &middot; ';
break;
case 'slash':
/* translators: separator between taxonomy terms */
$separator = _x( ' / ', 'list item separator', 'kadence' );
break;
case 'dash':
/* translators: separator between taxonomy terms */
$separator = _x( ' - ', 'list item separator', 'kadence' );
break;
default:
/* translators: separator between taxonomy terms */
$separator = _x( ' | ', 'list item separator', 'kadence' );
break;
}
if ('pill' === $style ) {
$separator = ' ';
}
?>
<div class="entry-taxonomies">
<span class="category-links term-links category-style-<?php echo esc_attr( $style ); ?>">
<?php
if ( $tax_slug === 'category' ) {
$categories = get_the_terms(get_the_ID(), $tax_slug); // get_the_categories()
if( ! empty( $categories ) ) {
$category_html = '';
foreach ( $categories as $key => $category ) {
$color = get_term_meta( $category->term_id, 'archive_category_color', true );
$hover_color = get_term_meta( $category->term_id, 'archive_category_hover_color', true );
if ($color !== '' || $hover_color !== '') {
$category_html .= '<style>';
if ( $color !== '') {
$category_html .=
'.loop-entry.type-post .entry-taxonomies a.category-link-' . esc_attr( $category->slug ) . ' {
' . ( $style === 'pill' ? 'background-color' : 'color') . ': ' . esc_attr( $color ) . ';
}'
;
}
if ( $hover_color !== '') {
$category_html .=
'.loop-entry.type-post .entry-taxonomies a.category-link-' . esc_attr( $category->slug ) . ':hover {
' . ( $style === 'pill' ? 'background-color' : 'color') . ': ' . esc_attr( $hover_color ) . ';
}'
;
}
$category_html .= '</style>';
}
$category_html .= '<a href="' . esc_url( get_term_link( $category->term_id ) ) . '" class="category-link-' . esc_attr( $category->slug ) . '" rel="tag">' . esc_attr__( $category->name) . '</a>';
if ( $key < count($categories) - 1 ) {
$category_html .= esc_html( $separator );
}
}
echo $category_html;
}
} else {
echo get_the_term_list(get_the_ID(), $tax_slug, '', esc_html($separator), ''); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
</span>
</div><!-- .entry-taxonomies -->
<?php
}
}

View File

@@ -0,0 +1,66 @@
<?php
/**
* Template part for displaying a post's featured image
*
* @package kadence
*/
namespace Kadence;
if ( post_password_required() || ! post_type_supports( get_post_type(), 'thumbnail' ) || ! has_post_thumbnail() ) {
return;
}
$defaults = [
'enabled' => true,
'ratio' => '2-3',
'size' => 'medium_large',
'imageLink' => true,
];
$slug = ( is_search() ? 'search' : get_post_type() );
$feature_element = kadence()->option( $slug . '_archive_element_feature', $defaults );
if ( isset( $feature_element ) && is_array( $feature_element ) && true === $feature_element['enabled'] ) {
$feature_element = wp_parse_args( $feature_element, $defaults );
$ratio = ( isset( $feature_element['ratio'] ) && ! empty( $feature_element['ratio'] ) ? $feature_element['ratio'] : '2-3' );
$size = ( isset( $feature_element['size'] ) && ! empty( $feature_element['size'] ) ? $feature_element['size'] : 'medium_large' );
$thumbnail_id = get_post_thumbnail_id();
$alt = get_post_meta( $thumbnail_id, '_wp_attachment_image_alt', true );
if ( isset( $feature_element['imageLink'] ) && ! $feature_element['imageLink'] ) {
?>
<div class="post-thumbnail kadence-thumbnail-ratio-<?php echo esc_attr( $ratio ); ?>">
<div class="post-thumbnail-inner">
<?php
the_post_thumbnail(
$size,
[
'alt' => ! empty( $alt ) ? $alt : the_title_attribute(
[
'echo' => false,
]
),
]
);
?>
</div>
</div><!-- .post-thumbnail -->
<?php
} else {
?>
<a aria-hidden="true" tabindex="-1" role="presentation" class="post-thumbnail kadence-thumbnail-ratio-<?php echo esc_attr( $ratio ); ?>" aria-label="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>">
<div class="post-thumbnail-inner">
<?php
the_post_thumbnail(
$size,
[
'alt' => ! empty( $alt ) ? $alt : the_title_attribute(
[
'echo' => false,
]
),
]
);
?>
</div>
</a><!-- .post-thumbnail -->
<?php
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* Template part for displaying a post's title
*
* @package kadence
*/
namespace Kadence;
$slug = ( is_search() ? 'search' : get_post_type() );
$title_element = kadence()->option(
$slug . '_archive_element_title',
[
'enabled' => true,
]
);
if ( isset( $title_element ) && is_array( $title_element ) && true === $title_element['enabled'] ) {
if ( is_search() || is_archive() || is_home() ) {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
} else {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
}
}

View File

@@ -0,0 +1,302 @@
<?php
/**
* Template part for displaying a post's metadata
*
* @package kadence
*/
namespace Kadence;
global $post;
$item_type = get_post_type();
$elements = kadence()->option( $item_type . '_title_element_meta' );
$title_meta = array();
$meta_labels = array();
$meta_divider = 'dot';
$author_image = false;
$author_link = true;
$author_image_size = 25;
if ( isset( $elements ) && is_array( $elements ) ) {
if ( isset( $elements['divider'] ) && $elements['divider'] ) {
$meta_divider = $elements['divider'];
}
if ( isset( $elements['author'] ) && $elements['author'] ) {
$title_meta[] = 'author';
if ( isset( $elements['authorEnableLabel'] ) && $elements['authorEnableLabel'] ) {
$meta_labels['author'] = ( isset( $elements['authorLabel'] ) && ! empty( $elements['authorLabel'] ) ? $elements['authorLabel'] : __( 'By', 'kadence' ) );
}
if ( isset( $elements['authorImage'] ) && $elements['authorImage'] ) {
$author_image = true;
}
if ( isset( $elements['authorLink'] ) && ! $elements['authorLink'] ) {
$author_link = false;
}
if ( isset( $elements['authorImageSize'] ) && $elements['authorImageSize'] ) {
$author_image_size = absint( $elements['authorImageSize'] );
}
}
if ( isset( $elements['date'] ) && $elements['date'] ) {
if ( isset( $elements['dateTime'] ) && $elements['dateTime'] ) {
$title_meta[] = 'dateTime';
} else {
$title_meta[] = 'date';
}
if ( isset( $elements['dateEnableLabel'] ) && $elements['dateEnableLabel'] ) {
$meta_labels['date'] = ( isset( $elements['dateLabel'] ) && ! empty( $elements['dateLabel'] ) ? $elements['dateLabel'] : __( 'Posted on', 'kadence' ) );
}
}
if ( isset( $elements['dateUpdated'] ) && $elements['dateUpdated'] ) {
if ( isset( $elements['dateUpdatedTime'] ) && $elements['dateUpdatedTime'] ) {
$title_meta[] = 'dateUpdatedTime';
} else {
$title_meta[] = 'dateUpdated';
}
if ( isset( $elements['dateUpdatedEnableLabel'] ) && $elements['dateUpdatedEnableLabel'] ) {
$meta_labels['dateUpdated'] = ( isset( $elements['dateUpdatedLabel'] ) && ! empty( $elements['dateUpdatedLabel'] ) ? $elements['dateUpdatedLabel'] : __( 'Updated on', 'kadence' ) );
}
}
if ( isset( $elements['categories'] ) && $elements['categories'] ) {
$title_meta[] = 'categories';
if ( isset( $elements['categoriesEnableLabel'] ) && $elements['categoriesEnableLabel'] ) {
$meta_labels['categories'] = ( isset( $elements['categoriesLabel'] ) && ! empty( $elements['categoriesLabel'] ) ? $elements['categoriesLabel'] : __( 'Posted in', 'kadence' ) );
}
}
if ( isset( $elements['comments'] ) && $elements['comments'] ) {
$title_meta[] = 'comments';
}
}
if ( empty( $title_meta ) ) {
return;
}
$item_id = get_the_ID();
$post_type_obj = get_post_type_object( get_post_type() );
?>
<div class="entry-meta entry-meta-divider-<?php echo esc_attr( $meta_divider ); ?>">
<?php
do_action( 'kadence_before_entry_meta' );
foreach ( $title_meta as $title_meta_item ) {
switch ( $title_meta_item ) {
case 'author':
$author_string = '';
// Show author only if the post type supports it.
if ( post_type_supports( $post_type_obj->name, 'author' ) ) {
$author_id = get_post_field( 'post_author', get_the_ID() );
if ( $author_link ) {
if ( get_the_author_meta( 'url' ) && apply_filters( 'kadence_author_use_profile_link', true ) ) {
$author_string = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_the_author_meta( 'url', $author_id ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
} else {
$author_string = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_author_posts_url( $author_id ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
}
} else {
$author_string = sprintf(
'<span class="author vcard"><span class="fn n">%1$s</span></span>',
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
}
}
if ( ! empty( $author_string ) ) {
$author_output = '<span class="posted-by">';
if ( $author_image ) {
$author_output .= '<span class="author-avatar"' . ( $author_image_size && 25 !== $author_image_size ? ' style="width:' . esc_attr( $author_image_size ) . 'px; height:' . esc_attr( $author_image_size ) . 'px;"' : '' ) . '>';
if ( $author_link ) {
if ( get_the_author_meta( 'url' ) && apply_filters( 'kadence_author_use_profile_link', true ) ) {
$author_output .= sprintf(
'<a class="author-image" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( get_the_author_meta( 'url', $author_id ) ),
esc_attr__( 'Author image', 'kadence' ),
get_avatar( $author_id, ( 2 * $author_image_size ) )
);
} else {
$author_output .= sprintf(
'<a class="author-image" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( get_author_posts_url( $author_id ) ),
esc_attr__( 'Author image', 'kadence' ),
get_avatar( $author_id, ( 2 * $author_image_size ) )
);
}
} else {
$author_output .= sprintf(
'<span class="author-image">%1$s</span>',
get_avatar( $author_id, ( 2 * $author_image_size ) )
);
}
$author_output .= '<span class="image-size-ratio"></span>';
$author_output .= '</span>';
}
if ( isset( $meta_labels['author'] ) ) {
$author_output .= '<span class="meta-label">' . esc_html( $meta_labels['author'] ) . '</span>';
}
$author_output .= $author_string;
$author_output .= '</span>';
echo apply_filters( 'kadence_author_meta_output', $author_output ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
break;
case 'date':
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time><time class="updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
if ( ! empty( $time_string ) ) {
?>
<span class="posted-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['date'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['date'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateTime':
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s %3$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s %3$s</time><time class="updated" datetime="%4$s" itemprop="dateModified">%5$s %6$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_html( get_the_time() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
esc_html( get_the_modified_time() )
);
if ( ! empty( $time_string ) ) {
?>
<span class="posted-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['date'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['date'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateUpdated':
if ( isset( $elements['dateUpdatedDifferent'] ) && $elements['dateUpdatedDifferent'] && get_the_date() === get_the_modified_date() ) {
$time_string = '';
} else {
$time_string = sprintf(
'<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s</time>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
}
if ( ! empty( $time_string ) ) {
?>
<span class="updated-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['dateUpdated'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['dateUpdated'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateUpdatedTime':
$publish_time = get_the_time( 'U' ) + ( 60 * 5 );
if ( isset( $elements['dateUpdatedDifferent'] ) && $elements['dateUpdatedDifferent'] && $publish_time > get_the_modified_time( 'U' ) ) {
$time_string = '';
} else {
$time_string = sprintf(
'<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s %3$s</time>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
esc_html( get_the_modified_time() )
);
}
if ( ! empty( $time_string ) ) {
?>
<span class="updated-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['dateUpdated'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['dateUpdated'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'categories':
if ( has_term( '', 'category' ) ) {
/* translators: separator between taxonomy terms */
$separator = _x( ', ', 'list item separator', 'kadence' );
?>
<span class="category-links">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'folder', '', false );
}
if ( isset( $meta_labels['categories'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['categories'] ) . '</span>';
}
echo '<span class="category-link-items">' . get_the_category_list( esc_html( $separator ), '', get_the_ID() ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'comments':
$show = true;
if ( isset( $elements['commentsCondition'] ) && $elements['commentsCondition'] && 0 == get_comments_number() ) {
$show = false;
}
if ( $show ) {
echo '<div class="meta-comments">';
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'commentsAlt', '', false );
}
echo '<a class="meta-comments-link anchor-scroll" href="#comments">';
if ( '1' === get_comments_number() ) {
echo esc_html( get_comments_number() ) . ' ' . esc_html__( 'Comment', 'kadence' );
} else {
echo esc_html( get_comments_number() ) . ' ' . esc_html__( 'Comments', 'kadence' );
}
echo '</a>';
echo '</div>';
}
break;
}
}
do_action( 'kadence_after_entry_meta' );
?>
</div><!-- .entry-meta -->
<?php

View File

@@ -0,0 +1,56 @@
<?php
/**
* Template part for displaying a post's footer
*
* @package kadence
*/
namespace Kadence;
use WP_Query;
use function apply_filters;
use function Kadence\kadence;
use function get_template_part;
kadence()->print_styles( 'kadence-related-posts' );
kadence()->print_styles( 'kad-splide' );
wp_enqueue_script( 'kadence-slide-init' );
$args = get_related_posts_args( $post->ID );
$cols = get_related_posts_columns();
$columns_class = apply_filters( 'kadence_related_posts_columns_class', ( 2 === $cols['xxl'] ? 'grid-sm-col-2 grid-lg-col-2' : 'grid-sm-col-2 grid-lg-col-3' ) );
$bpc = new WP_Query( apply_filters( 'kadence_related_posts_carousel_args', $args ) );
if ( $bpc ) :
$num = $bpc->post_count;
if ( $num > 0 ) {
?>
<div class="entry-related alignfull entry-related-style-<?php echo esc_attr( kadence()->option( 'post_related_style' ) ); ?>">
<div class="entry-related-inner content-container site-container">
<div class="entry-related-inner-content alignwide">
<?php
$related_title_option = esc_html( do_shortcode( kadence()->option( 'post_related_title' ) ) );
$related_title = $related_title_option ? $related_title_option : esc_html__( 'Similar Posts', 'kadence' );
echo wp_kses_post( apply_filters( 'kadence_single_post_similar_posts_title', '<h2 class="entry-related-title" id="related-posts-title">' . $related_title . '</h2>' ) );
?>
<div class="entry-related-carousel kadence-slide-init splide" aria-labelledby="related-posts-title" data-columns-xxl="<?php echo esc_attr( $cols['xxl'] ); ?>" data-columns-xl="<?php echo esc_attr( $cols['xl'] ); ?>" data-columns-md="<?php echo esc_attr( $cols['md'] ); ?>" data-columns-sm="<?php echo esc_attr( $cols['sm'] ); ?>" data-columns-xs="<?php echo esc_attr( $cols['xs'] ); ?>" data-columns-ss="<?php echo esc_attr( $cols['ss'] ); ?>" data-slider-anim-speed="400" data-slider-scroll="1" data-slider-dots="<?php echo esc_attr( kadence()->option( 'post_related_carousel_dots' ) ? 'true' : 'false' ); ?>" data-slider-arrows="true" data-slider-hover-pause="false" data-slider-auto="<?php echo esc_attr( apply_filters( 'kadence_single_post_similar_posts_carousel_autoplay', false ) ? 'true' : 'false' ); ?>" data-slider-speed="7000" data-slider-gutter="40" data-slider-loop="<?php echo esc_attr( kadence()->option( 'post_related_carousel_loop' ) ? 'true' : 'false' ); ?>" data-slider-next-label="<?php echo esc_attr__( 'Next', 'kadence' ); ?>" data-slider-slide-label="<?php echo esc_attr__( 'Posts', 'kadence' ); ?>" data-slider-prev-label="<?php echo esc_attr__( 'Previous', 'kadence' ); ?>">
<div class="splide__track">
<ul class="splide__list kadence-posts-list grid-cols <?php echo esc_attr( $columns_class ); ?>">
<?php
while ( $bpc->have_posts() ) :
$bpc->the_post();
echo '<li class="entry-list-item carousel-item splide__slide">';
get_template_part( 'template-parts/content/entry-related', get_post_type() );
echo '</li>';
endwhile;
?>
</ul>
</div>
</div>
</div>
</div>
</div><!-- .entry-author -->
<?php
}
endif;
wp_reset_postdata();

View File

@@ -0,0 +1,41 @@
<?php
/**
* Template part for displaying a post's summary
*
* @package kadence
*/
namespace Kadence;
use function get_post_type;
use function the_content;
use function the_excerpt;
$slug = ( is_search() ? 'search' : get_post_type() );
$excerpt_element = kadence()->option( $slug . '_archive_element_excerpt' );
if ( isset( $excerpt_element ) && is_array( $excerpt_element ) && true === $excerpt_element['enabled'] ) {
?>
<div class="entry-summary">
<?php
if ( true === kadence()->sub_option( $slug . '_archive_element_excerpt', 'fullContent' ) ) {
global $more; $more = 0;
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Read More<span class="screen-reader-text"> "%s"</span>', 'kadence' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
)
);
} else {
the_excerpt();
}
?>
</div><!-- .entry-summary -->
<?php
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* Template part for displaying a post's footer
*
* @package kadence
*/
namespace Kadence;
$tags = get_the_tags();
if ( ! is_array( $tags ) ) {
return;
}
?>
<div class="entry-tags">
<span class="tags-links">
<span class="tags-label screen-reader-text">
<?php echo esc_html__( 'Post Tags:', 'kadence' ); ?>
</span>
<?php
foreach ( $tags as $tag_item ) {
$tag_link = get_tag_link( $tag_item->term_id );
echo '<a href=' . esc_url( $tag_link ) . ' title="' . esc_attr( $tag_item->name ) . '" class="tag-link tag-item-' . esc_attr( $tag_item->slug ) . '" rel="tag"><span class="tag-hash">#</span>' . esc_html( $tag_item->name ) . '</a>';
}
?>
</span>
</div><!-- .entry-tags -->

View File

@@ -0,0 +1,44 @@
<?php
/**
* Template part for displaying a post's category terms
*
* @package kadence
*/
namespace Kadence;
$elements = kadence()->option( get_post_type() . '_title_element_categories' );
if ( isset( $elements ) && is_array( $elements ) && true === $elements['enabled'] ) {
$tax_slug = ( isset( $elements['taxonomy'] ) && ! empty( $elements['taxonomy'] ) ? $elements['taxonomy'] : 'category' );
if ( has_term( '', $tax_slug ) ) {
$divider = ( isset( $elements['divider'] ) && ! empty( $elements['divider'] ) ? $elements['divider'] : 'vline' );
$style = ( isset( $elements['style'] ) && ! empty( $elements['style'] ) ? $elements['style'] : 'normal' );
switch ( $divider ) {
case 'dot':
$separator = ' &middot; ';
break;
case 'slash':
/* translators: separator between taxonomy terms */
$separator = _x( ' / ', 'list item separator', 'kadence' );
break;
case 'dash':
/* translators: separator between taxonomy terms */
$separator = _x( ' - ', 'list item separator', 'kadence' );
break;
default:
/* translators: separator between taxonomy terms */
$separator = _x( ' | ', 'list item separator', 'kadence' );
break;
}
if ( 'pill' === $style ) {
$separator = ' ';
}
?>
<div class="entry-taxonomies">
<span class="category-links term-links category-style-<?php echo esc_attr( $style ); ?>">
<?php echo get_the_term_list( get_the_ID(), $tax_slug, '', esc_html( $separator ), '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span>
</div><!-- .entry-taxonomies -->
<?php
}
}

View File

@@ -0,0 +1,77 @@
<?php
/**
* Template part for displaying a post's featured image
*
* @package kadence
*/
namespace Kadence;
// Audio or video attachments can have featured images, so they need to be specifically checked.
$support_slug = get_post_type();
if ( 'attachment' === $support_slug ) {
if ( wp_attachment_is( 'audio' ) ) {
$support_slug .= ':audio';
} elseif ( wp_attachment_is( 'video' ) ) {
$support_slug .= ':video';
}
}
if ( post_password_required() || ! post_type_supports( $support_slug, 'thumbnail' ) || ! has_post_thumbnail() ) {
return;
}
if ( is_singular( get_post_type() ) ) {
?>
<div class="post-thumbnail article-post-thumbnail kadence-thumbnail-position-<?php echo esc_attr( kadence()->get_feature_position() ); ?><?php echo ( 'behind' === kadence()->get_feature_position() ? ' align' . esc_attr( kadence()->option( 'post_feature_width', 'wide' ) ) : '' ); ?> kadence-thumbnail-ratio-<?php echo esc_attr( kadence()->option( $support_slug . '_feature_ratio', '2-3' ) ); ?>">
<div class="post-thumbnail-inner">
<?php the_post_thumbnail( apply_filters( 'kadence_single_featured_image_size', 'full' ), array( 'class' => 'post-top-featured') ); ?>
</div>
</div><!-- .post-thumbnail -->
<?php
if ( 'behind' !== kadence()->get_feature_position() && kadence()->option( $support_slug . '_feature_caption', false ) ) {
$caption = get_the_post_thumbnail_caption();
if ( ! empty( $caption ) ) {
echo '<div class="article-post-thumbnail-caption content-bg">' . wp_kses_post( $caption ) . '</div>';
}
}
?>
<?php do_action( 'kadence_single_after_featured_image' ); ?>
<?php
} else {
?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
<div class="post-thumbnail-inner">
<?php
global $wp_query;
$thumbnail_id = get_post_thumbnail_id();
$alt = get_post_meta( $thumbnail_id, '_wp_attachment_image_alt', true );
if ( 0 === $wp_query->current_post ) {
the_post_thumbnail(
'post-thumbnail',
array(
'class' => 'post-top-featured',
'alt' => ! empty( $alt ) ? $alt : the_title_attribute(
array(
'echo' => false,
)
),
)
);
} else {
the_post_thumbnail(
'post-thumbnail',
array(
'alt' => ! empty( $alt ) ? $alt : the_title_attribute(
array(
'echo' => false,
)
),
)
);
}
?>
</div>
</a><!-- .post-thumbnail -->
<?php do_action( 'kadence_loop_after_featured_image' ); ?>
<?php
}

View File

@@ -0,0 +1,12 @@
<?php
/**
* Template part for displaying a post's title
*
* @package kadence
*/
namespace Kadence;
do_action( 'kadence_single_before_entry_title' );
the_title( '<h1 class="entry-title">', '</h1>' );
do_action( 'kadence_single_after_entry_title' );

View File

@@ -0,0 +1,32 @@
<?php
/**
* Template part for displaying the page content when a 404 error has occurred
*
* @package kadence
*/
namespace Kadence;
?>
<section class="error">
<div class="page-content entry content-bg">
<div class="entry-content-wrap">
<?php
do_action( 'kadence_404_before_inner_content' );
get_template_part( 'template-parts/content/page_header' ); ?>
<p>
<?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'kadence' ); ?>
</p>
<?php
get_search_form();
do_action( 'kadence_404_after_inner_content' );
?>
</div>
</div><!-- .page-content -->
</section><!-- .error -->

View File

@@ -0,0 +1,32 @@
<?php
/**
* Template part for displaying the page content when a 500 error has occurred
*
* @package kadence
*/
namespace Kadence;
?>
<section class="error">
<div class="page-content entry content-bg">
<div class="entry-content-wrap">
<header class="page-header">
<h1 class="page-title">
<?php esc_html_e( 'Oops! Something went wrong.', 'kadence' ); ?>
</h1>
</header><!-- .page-header -->
<?php
if ( function_exists( 'wp_service_worker_error_message_placeholder' ) ) {
wp_service_worker_error_message_placeholder();
}
if ( function_exists( 'wp_service_worker_error_details_template' ) ) {
wp_service_worker_error_details_template();
}
?>
</div><!-- .entry-content-wrap -->
</div><!-- .page-content -->
</section><!-- .error -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the page content when an offline error has occurred
*
* @package kadence
*/
namespace Kadence;
?>
<section class="error">
<header class="page-header">
<h1 class="page-title">
<?php esc_html_e( 'Oops! It looks like you&#8217;re offline.', 'kadence' ); ?>
</h1>
</header><!-- .page-header -->
<div class="page-content">
<?php
if ( function_exists( 'wp_service_worker_error_message_placeholder' ) ) {
wp_service_worker_error_message_placeholder();
}
?>
</div><!-- .page-content -->
</section><!-- .error -->

View File

@@ -0,0 +1,50 @@
<?php
/**
* Template part for displaying the page content when an error has occurred
*
* @package kadence
*/
namespace Kadence;
?>
<section class="error">
<div class="page-content">
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) {
?>
<p>
<?php
printf(
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>.', 'kadence' ),
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.', 'kadence' ); ?>
</p>
<?php
} else {
?>
<p>
<?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'kadence' ); ?>
</p>
<?php
}
get_search_form();
?>
</div><!-- .page-content -->
</section><!-- .error -->

View File

@@ -0,0 +1,57 @@
<?php
/**
* Template part for displaying the page header of the currently displayed page
*
* @package kadence
*/
namespace Kadence;
if ( is_404() ) {
?>
<header class="page-header">
<h1 class="page-title">
<?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'kadence' ); ?>
</h1>
</header><!-- .page-header -->
<?php
} elseif ( is_home() && ! have_posts() ) {
?>
<header class="page-header">
<h1 class="page-title">
<?php esc_html_e( 'Nothing Found', 'kadence' ); ?>
</h1>
</header><!-- .page-header -->
<?php
} elseif ( is_home() && ! is_front_page() ) {
?>
<header class="page-header">
<h1 class="page-title">
<?php single_post_title(); ?>
</h1>
</header><!-- .page-header -->
<?php
} elseif ( is_search() ) {
?>
<header class="page-header">
<h1 class="page-title">
<?php
printf(
/* translators: %s: search query */
esc_html__( 'Search Results for: %s', 'kadence' ),
'<span>' . get_search_query() . '</span>'
);
?>
</h1>
</header><!-- .page-header -->
<?php
} elseif ( is_archive() ) {
?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="archive-description">', '</div>' );
?>
</header><!-- .page-header -->
<?php
}

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying a pagination
*
* @package kadence
*/
namespace Kadence;
the_posts_pagination(
apply_filters(
'kadence_pagination_args',
array(
'mid_size' => 2,
'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Page', 'kadence' ) . '</span>' . kadence()->get_icon( 'arrow-left', _x( 'Previous', 'previous set of archive results', 'kadence' ) ),
'next_text' => '<span class="screen-reader-text">' . __( 'Next Page', 'kadence' ) . '</span>' . kadence()->get_icon( 'arrow-right', _x( 'Next', 'next set of archive results', 'kadence' ) ),
'screen_reader_text' => __( 'Page navigation', 'kadence' ),
)
)
);

View File

@@ -0,0 +1,73 @@
<?php
/**
* Template part for displaying a post or page.
*
* @package kadence
*/
namespace Kadence;
?>
<?php
if ( kadence()->show_feature_above() ) {
get_template_part( 'template-parts/content/entry_thumbnail', get_post_type() );
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'entry content-bg single-entry' . ( kadence()->option( 'post_footer_area_boxed' ) ? ' post-footer-area-boxed' : '' ) ); ?>>
<div class="entry-content-wrap">
<?php
do_action( 'kadence_single_before_inner_content' );
if ( kadence()->show_in_content_title() ) {
get_template_part( 'template-parts/content/entry_header', get_post_type() );
}
if ( kadence()->show_feature_below() ) {
get_template_part( 'template-parts/content/entry_thumbnail', get_post_type() );
}
get_template_part( 'template-parts/content/entry_content', get_post_type() );
if ( 'post' === get_post_type() && kadence()->option( 'post_tags' ) ) {
get_template_part( 'template-parts/content/entry_footer', get_post_type() );
}
do_action( 'kadence_single_after_inner_content' );
?>
</div>
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* Hook for anything after single content
*/
do_action( 'kadence_single_after_content' );
if ( is_singular( get_post_type() ) ) {
if ( 'post' === get_post_type() && kadence()->option( 'post_author_box' ) ) {
get_template_part( 'template-parts/content/entry_author', get_post_type() );
}
// Show post navigation only when the post type is 'post' or has an archive.
if ( ( 'post' === get_post_type() || get_post_type_object( get_post_type() )->has_archive ) && kadence()->show_post_navigation() ) {
if ( kadence()->option( 'post_footer_area_boxed' ) ) {
echo '<div class="post-navigation-wrap content-bg entry-content-wrap entry">';
}
the_post_navigation(
apply_filters(
'kadence_post_navigation_args',
array(
'prev_text' => '<div class="post-navigation-sub"><small>' . kadence()->get_icon( 'arrow-left-alt' ) . esc_html__( 'Previous', 'kadence' ) . '</small></div>%title',
'next_text' => '<div class="post-navigation-sub"><small>' . esc_html__( 'Next', 'kadence' ) . kadence()->get_icon( 'arrow-right-alt' ) . '</small></div>%title',
)
)
);
if ( kadence()->option( 'post_footer_area_boxed' ) ) {
echo '</div>';
}
}
if ( 'post' === get_post_type() && kadence()->option( 'post_related' ) ) {
get_template_part( 'template-parts/content/entry_related', get_post_type() );
}
// Show comments only when the post type supports it and when comments are open or at least one comment exists.
if ( kadence()->show_comments() ) {
comments_template();
}
}

View File

@@ -0,0 +1,52 @@
<?php
/**
* The main single item template file.
*
* @package kadence
*/
namespace Kadence;
/**
* Hook for Hero Section
*/
do_action( 'kadence_hero_header' );
?>
<div id="primary" class="content-area">
<div class="content-container site-container">
<div id="main" class="site-main">
<?php
/**
* Hook for anything before main content
*/
do_action( 'kadence_before_main_content' );
?>
<div class="content-wrap">
<?php
if ( is_404() ) {
do_action( 'kadence_404_content' );
} elseif ( have_posts() ) {
while ( have_posts() ) {
the_post();
/**
* Hook in content single entry template.
*/
do_action( 'kadence_single_content' );
}
} else {
get_template_part( 'template-parts/content/error' );
}
?>
</div>
<?php
/**
* Hook for anything after main content
*/
do_action( 'kadence_after_main_content' );
?>
</div><!-- #main -->
<?php
get_sidebar();
?>
</div>
</div><!-- #primary -->

View File

@@ -0,0 +1,40 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
if ( kadence()->has_content() ) {
kadence()->print_styles( 'kadence-content' );
}
kadence()->print_styles( 'kadence-footer' );
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-footer-wrap">
<?php
/**
* Kadence Top footer
*
* Hooked Kadence\top_footer
*/
do_action( 'kadence_top_footer' );
/**
* Kadence Middle footer
*
* Hooked Kadence\middle_footer
*/
do_action( 'kadence_middle_footer' );
/**
* Kadence Bottom footer
*
* Hooked Kadence\bottom_footer
*/
do_action( 'kadence_bottom_footer' );
?>
</div>
</footer><!-- #colophon -->

View File

@@ -0,0 +1,31 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_html_align', 'desktop' ) ? kadence()->sub_option( 'footer_html_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_html_align', 'tablet' ) ? kadence()->sub_option( 'footer_html_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_html_align', 'mobile' ) ? kadence()->sub_option( 'footer_html_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_html_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_html_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_html_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_html_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_html_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_html_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area site-info site-footer-focus-item content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="kadence_customizer_footer_html">
<div class="footer-widget-area-inner site-info-inner">
<?php
/**
* Kadence Footer HTML
*
* Hooked Kadence\footer_html
*/
do_action( 'kadence_footer_html' );
?>
</div>
</div><!-- .site-info -->

View File

@@ -0,0 +1,30 @@
<?php
/**
* Template part for displaying the header Social Modual
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_navigation_align', 'desktop' ) ? kadence()->sub_option( 'footer_navigation_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_navigation_align', 'tablet' ) ? kadence()->sub_option( 'footer_navigation_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_navigation_align', 'mobile' ) ? kadence()->sub_option( 'footer_navigation_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_navigation_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_navigation_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_navigation_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_navigation_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_navigation_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_navigation_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-navigation-wrap content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?> footer-navigation-layout-stretch-<?php echo ( kadence()->option( 'footer_navigation_stretch' ) ? 'true' : 'false' ); ?>" data-section="kadence_customizer_footer_navigation">
<div class="footer-widget-area-inner footer-navigation-inner">
<?php
/**
* Kadence Footer Navigation
*
* Hooked Kadence\footer_navigation
*/
do_action( 'kadence_footer_navigation' );
?>
</div>
</div><!-- data-section="footer_navigation" -->

View File

@@ -0,0 +1,48 @@
<?php
/**
* Template part for displaying the a row of the footer
*
* @package kadence
*/
namespace Kadence;
$row = get_query_var( 'row' );
$tablet_contain = ( kadence()->sub_option( 'footer_' . $row . '_contain', 'tablet' ) ? kadence()->sub_option( 'footer_' . $row . '_contain', 'tablet' ) : 'default' );
$mobile_contain = ( kadence()->sub_option( 'footer_' . $row . '_contain', 'mobile' ) ? kadence()->sub_option( 'footer_' . $row . '_contain', 'mobile' ) : 'default' );
$tablet_layout = ( kadence()->sub_option( 'footer_' . $row . '_layout', 'tablet' ) ? kadence()->sub_option( 'footer_' . $row . '_layout', 'tablet' ) : 'default' );
$link_style = kadence()->option( 'footer_' . $row . '_link_style' );
$columns = absint( kadence()->option( 'footer_' . $row . '_columns' ) );
$tablet_direction = ( kadence()->sub_option( 'footer_' . $row . '_direction', 'tablet' ) ? kadence()->sub_option( 'footer_' . $row . '_direction', 'tablet' ) : 'default' );
$mobile_direction = ( kadence()->sub_option( 'footer_' . $row . '_direction', 'mobile' ) ? kadence()->sub_option( 'footer_' . $row . '_direction', 'mobile' ) : 'default' );
$i = 0;
?>
<div class="site-<?php echo esc_attr( $row ); ?>-footer-wrap site-footer-row-container site-footer-focus-item site-footer-row-layout-<?php echo esc_attr( kadence()->sub_option( 'footer_' . $row . '_contain', 'desktop' ) ); ?> site-footer-row-tablet-layout-<?php echo esc_attr( $tablet_contain ); ?> site-footer-row-mobile-layout-<?php echo esc_attr( $mobile_contain ); ?>" data-section="kadence_customizer_footer_<?php echo esc_attr( $row ); ?>">
<div class="site-footer-row-container-inner">
<?php if ( is_customize_preview() ) { ?>
<div class="customize-partial-edit-shortcut kadence-custom-partial-edit-shortcut">
<button aria-label="<?php esc_attr_e( 'Click to edit this element.', 'kadence' ); ?>" title="<?php esc_attr_e( 'Click to edit this element.', 'kadence' ); ?>" class="customize-partial-edit-shortcut-button item-customizer-focus"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"></path></svg></button>
</div>
<?php } ?>
<div class="site-container">
<div class="site-<?php echo esc_attr( $row ); ?>-footer-inner-wrap site-footer-row site-footer-row-columns-<?php echo esc_attr( kadence()->option( 'footer_' . $row . '_columns' ) ); ?> site-footer-row-column-layout-<?php echo esc_attr( kadence()->sub_option( 'footer_' . $row . '_layout', 'desktop' ) ); ?> site-footer-row-tablet-column-layout-<?php echo esc_attr( $tablet_layout ); ?> site-footer-row-mobile-column-layout-<?php echo esc_attr( kadence()->sub_option( 'footer_' . $row . '_layout', 'mobile' ) ); ?> ft-ro-dir-<?php echo esc_attr( kadence()->sub_option( 'footer_' . $row . '_direction', 'desktop' ) ); ?> ft-ro-collapse-<?php echo esc_attr( kadence()->option( 'footer_' . $row . '_collapse' ) ); ?> ft-ro-t-dir-<?php echo esc_attr( $tablet_direction ); ?> ft-ro-m-dir-<?php echo esc_attr( $mobile_direction ); ?> ft-ro-lstyle-<?php echo esc_attr( $link_style ); ?>">
<?php
while ( $i++ < $columns ) {
?>
<div class="site-footer-<?php echo esc_attr( $row ); ?>-section-<?php echo esc_attr( $i ); ?> site-footer-section footer-section-inner-items-<?php echo esc_attr( kadence()->footer_column_item_count( $row, $i ) ); ?>">
<?php
/**
* Kadence Render Footer Column
*
* Hooked Kadence\footer_column
*/
do_action( 'kadence_render_footer_column', $row, $i );
?>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,32 @@
<?php
/**
* Template part for displaying the Footer Social Module
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_social_align', 'desktop' ) ? kadence()->sub_option( 'footer_social_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_social_align', 'tablet' ) ? kadence()->sub_option( 'footer_social_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_social_align', 'mobile' ) ? kadence()->sub_option( 'footer_social_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_social_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_social_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_social_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_social_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_social_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_social_vertical_align', 'mobile' ) : 'default' );
if ( ! wp_style_is( 'kadence-header', 'enqueued' ) ) {
wp_enqueue_style( 'kadence-header' );
}
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-social content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="kadence_customizer_footer_social">
<div class="footer-widget-area-inner footer-social-inner">
<?php
/**
* Kadence Footer Social
*
* Hooked Kadence\footer_social
*/
do_action( 'kadence_footer_social' );
?>
</div>
</div><!-- data-section="footer_social" -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_widget1_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget1_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_widget1_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget1_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_widget1_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget1_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_widget1_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget1_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_widget1_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget1_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_widget1_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget1_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-widget1 content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="sidebar-widgets-footer1">
<div class="footer-widget-area-inner site-info-inner">
<?php
dynamic_sidebar( 'footer1' );
?>
</div>
</div><!-- .footer-widget1 -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_widget2_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget2_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_widget2_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget2_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_widget2_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget2_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_widget2_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget2_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_widget2_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget2_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_widget2_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget2_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-widget2 content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="sidebar-widgets-footer2">
<div class="footer-widget-area-inner site-info-inner">
<?php
dynamic_sidebar( 'footer2' );
?>
</div>
</div><!-- .footer-widget2 -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_widget3_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget3_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_widget3_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget3_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_widget3_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget3_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_widget3_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget3_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_widget3_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget3_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_widget3_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget3_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-widget3 content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="sidebar-widgets-footer3">
<div class="footer-widget-area-inner site-info-inner">
<?php
dynamic_sidebar( 'footer3' );
?>
</div>
</div><!-- .footer-widget3 -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_widget4_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget4_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_widget4_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget4_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_widget4_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget4_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_widget4_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget4_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_widget4_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget4_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_widget4_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget4_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-widget4 content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="sidebar-widgets-footer4">
<div class="footer-widget-area-inner site-info-inner">
<?php
dynamic_sidebar( 'footer4' );
?>
</div>
</div><!-- .footer-widget4 -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_widget5_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget5_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_widget5_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget5_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_widget5_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget5_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_widget5_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget5_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_widget5_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget5_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_widget5_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget5_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-widget5 content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="sidebar-widgets-footer5">
<div class="footer-widget-area-inner site-info-inner">
<?php
dynamic_sidebar( 'footer5' );
?>
</div>
</div><!-- .footer-widget5 -->

View File

@@ -0,0 +1,25 @@
<?php
/**
* Template part for displaying the footer info
*
* @package kadence
*/
namespace Kadence;
$align = ( kadence()->sub_option( 'footer_widget6_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget6_align', 'desktop' ) : 'default' );
$tablet_align = ( kadence()->sub_option( 'footer_widget6_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget6_align', 'tablet' ) : 'default' );
$mobile_align = ( kadence()->sub_option( 'footer_widget6_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget6_align', 'mobile' ) : 'default' );
$valign = ( kadence()->sub_option( 'footer_widget6_vertical_align', 'desktop' ) ? kadence()->sub_option( 'footer_widget6_vertical_align', 'desktop' ) : 'default' );
$tablet_valign = ( kadence()->sub_option( 'footer_widget6_vertical_align', 'tablet' ) ? kadence()->sub_option( 'footer_widget6_vertical_align', 'tablet' ) : 'default' );
$mobile_valign = ( kadence()->sub_option( 'footer_widget6_vertical_align', 'mobile' ) ? kadence()->sub_option( 'footer_widget6_vertical_align', 'mobile' ) : 'default' );
?>
<div class="footer-widget-area widget-area site-footer-focus-item footer-widget6 content-align-<?php echo esc_attr( $align ); ?> content-tablet-align-<?php echo esc_attr( $tablet_align ); ?> content-mobile-align-<?php echo esc_attr( $mobile_align ); ?> content-valign-<?php echo esc_attr( $valign ); ?> content-tablet-valign-<?php echo esc_attr( $tablet_valign ); ?> content-mobile-valign-<?php echo esc_attr( $mobile_valign ); ?>" data-section="sidebar-widgets-footer6">
<div class="footer-widget-area-inner site-info-inner">
<?php
dynamic_sidebar( 'footer6' );
?>
</div>
</div><!-- .footer-widget6 -->

View File

@@ -0,0 +1,67 @@
<?php
/**
* Template part for displaying the header
*
* @package kadence
*/
namespace Kadence;
kadence()->print_styles( 'kadence-header' );
?>
<header id="masthead" class="site-header" role="banner" <?php kadence()->print_microdata( 'header' ); ?>>
<div id="main-header" class="site-header-wrap">
<div class="site-header-inner-wrap<?php echo esc_attr( 'top_main_bottom' === kadence()->option( 'header_sticky' ) ? ' kadence-sticky-header' : '' ); ?>"<?php
if ( 'top_main_bottom' === kadence()->option( 'header_sticky' ) ) {
echo ' data-reveal-scroll-up="' . ( kadence()->option( 'header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
echo ' data-shrink="' . ( kadence()->option( 'header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
if ( kadence()->option( 'header_sticky_shrink' ) ) {
echo ' data-shrink-height="' . esc_attr( kadence()->sub_option( 'header_sticky_main_shrink', 'size' ) ) . '"';
}
}
?>>
<div class="site-header-upper-wrap">
<div class="site-header-upper-inner-wrap<?php echo esc_attr( 'top_main' === kadence()->option( 'header_sticky' ) ? ' kadence-sticky-header' : '' ); ?>"<?php
if ( 'top_main' === kadence()->option( 'header_sticky' ) ) {
echo ' data-reveal-scroll-up="' . ( kadence()->option( 'header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
echo ' data-shrink="' . ( kadence()->option( 'header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
if ( kadence()->option( 'header_sticky_shrink' ) ) {
echo ' data-shrink-height="' . esc_attr( kadence()->sub_option( 'header_sticky_main_shrink', 'size' ) ) . '"';
}
}
?>>
<?php
/**
* Kadence Top Header
*
* Hooked Kadence\top_header
*/
do_action( 'kadence_top_header' );
/**
* Kadence Main Header
*
* Hooked Kadence\main_header
*/
do_action( 'kadence_main_header' );
?>
</div>
</div>
<?php
/**
* Kadence Bottom Header
*
* Hooked Kadence\bottom_header
*/
do_action( 'kadence_bottom_header' );
?>
</div>
</div>
<?php
/**
* Kadence Mobile Header
*
* Hooked Kadence\mobile_header
*/
do_action( 'kadence_mobile_header' );
?>
</header><!-- #masthead -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header Button Modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_header_button">
<?php
/**
* Kadence Header Button
*
* Hooked Kadence\header_button
*/
do_action( 'kadence_header_button' );
?>
</div><!-- data-section="header_button" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header cart modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_cart">
<?php
/**
* Kadence Header Cart
*
* Hooked Kadence\header_cart
*/
do_action( 'kadence_header_cart' );
?>
</div><!-- data-section="cart" -->

View File

@@ -0,0 +1,95 @@
<?php
/**
* Template part for displaying the a row of the header
*
* @package kadence
*/
namespace Kadence;
$row = get_query_var( 'row' );
?>
<div class="<?php echo esc_attr( header_row_class( $row ) ); ?>" data-section="kadence_customizer_header_<?php echo esc_attr( $row ); ?>"<?php
if ( 'main' === $row && 'main' === kadence()->option( 'header_sticky' ) ) {
echo ' data-shrink="' . ( kadence()->option( 'header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
if ( kadence()->option( 'header_sticky_shrink' ) ) {
echo ' data-shrink-height="' . esc_attr( kadence()->sub_option( 'header_sticky_main_shrink', 'size' ) ) . '"';
}
}
if ( $row && $row === kadence()->option( 'header_sticky' ) ) {
echo ' data-reveal-scroll-up="' . ( kadence()->option( 'header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
}
?>>
<div class="site-header-row-container-inner">
<?php kadence()->customizer_quick_link(); ?>
<div class="site-container">
<div class="site-<?php echo esc_attr( $row ); ?>-header-inner-wrap site-header-row <?php echo ( kadence()->has_side_columns( $row ) ? 'site-header-row-has-sides' : 'site-header-row-only-center-column' ); ?> <?php echo ( kadence()->has_center_column( $row ) ? 'site-header-row-center-column' : 'site-header-row-no-center' ); ?>">
<?php if ( kadence()->has_side_columns( $row ) ) { ?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-left site-header-section site-header-section-left">
<?php
/**
* Kadence Render Header Column
*
* Hooked Kadence\header_column
*/
do_action( 'kadence_render_header_column', $row, 'left' );
if ( kadence()->has_center_column( $row ) ) {
?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-left-center site-header-section site-header-section-left-center">
<?php
/**
* Kadence Render Header Column
*
* Hooked Kadence\header_column
*/
do_action( 'kadence_render_header_column', $row, 'left_center' );
?>
</div>
<?php
}
?>
</div>
<?php } ?>
<?php if ( kadence()->has_center_column( $row ) ) { ?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-center site-header-section site-header-section-center">
<?php
/**
* Kadence Render Header Column
*
* Hooked Kadence\header_column
*/
do_action( 'kadence_render_header_column', $row, 'center' );
?>
</div>
<?php } ?>
<?php if ( kadence()->has_side_columns( $row ) ) { ?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-right site-header-section site-header-section-right">
<?php
if ( kadence()->has_center_column( $row ) ) {
?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-right-center site-header-section site-header-section-right-center">
<?php
/**
* Kadence Render Header Column
*
* Hooked Kadence\header_column
*/
do_action( 'kadence_render_header_column', $row, 'right_center' );
?>
</div>
<?php
}
/**
* Kadence Render Header Column
*
* Hooked Kadence\header_column
*/
do_action( 'kadence_render_header_column', $row, 'right' );
?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header HTML Modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_header_html">
<?php
/**
* Kadence Header HTML
*
* Hooked Kadence\header_html
*/
do_action( 'kadence_header_html' );
?>
</div><!-- data-section="header_html" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header branding/logo
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="title_tagline">
<?php
/**
* Kadence Site Branding
*
* Hooked Kadence\site_branding
*/
do_action( 'kadence_site_branding' );
?>
</div><!-- data-section="title_tagline" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the a button in the mobile header.
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_mobile_button">
<?php
/**
* Kadence Mobile Header Button
*
* Hooked Kadence\mobile_button
*/
do_action( 'kadence_mobile_button' );
?>
</div><!-- data-section="mobile_button" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header cart modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_mobile_cart">
<?php
/**
* Kadence Mobile Header Cart
*
* Hooked Kadence\mobile_cart
*/
do_action( 'kadence_mobile_cart' );
?>
</div><!-- data-section="mobile_cart" -->

View File

@@ -0,0 +1,82 @@
<?php
/**
* Template part for displaying a row of the mobile header
*
* @package kadence
*/
namespace Kadence;
$row = get_query_var( 'mobile_row' );
$tablet_layout = ( kadence()->sub_option( 'header_' . $row . '_layout', 'tablet' ) ? kadence()->sub_option( 'header_' . $row . '_layout', 'tablet' ) : 'default' );
$mobile_layout = ( kadence()->sub_option( 'header_' . $row . '_layout', 'mobile' ) ? kadence()->sub_option( 'header_' . $row . '_layout', 'mobile' ) : 'default' );
?>
<div class="site-<?php echo esc_attr( $row ); ?>-header-wrap site-header-focus-item site-header-row-layout-<?php echo esc_attr( kadence()->sub_option( 'header_' . $row . '_layout', 'desktop' ) ); ?> site-header-row-tablet-layout-<?php echo esc_attr( $tablet_layout ); ?> site-header-row-mobile-layout-<?php echo esc_attr( $mobile_layout ); ?> <?php echo esc_attr( $row === kadence()->option( 'mobile_header_sticky' ) ? ' kadence-sticky-header' : '' ); ?>"<?php
if ( $row === 'main' && 'main' === kadence()->option( 'mobile_header_sticky' ) ) {
echo ' data-shrink="' . ( kadence()->option( 'mobile_header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
echo ' data-reveal-scroll-up="' . ( kadence()->option( 'mobile_header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
if ( kadence()->option( 'mobile_header_sticky_shrink' ) ) {
echo ' data-shrink-height="' . esc_attr( kadence()->sub_option( 'mobile_header_sticky_main_shrink', 'size' ) ) . '"';
}
}
?>>
<div class="site-header-row-container-inner">
<div class="site-container">
<div class="site-<?php echo esc_attr( $row ); ?>-header-inner-wrap site-header-row <?php echo ( kadence()->has_mobile_side_columns( $row ) ? 'site-header-row-has-sides' : 'site-header-row-only-center-column' ); ?> <?php echo ( kadence()->has_mobile_center_column( $row ) ? 'site-header-row-center-column' : 'site-header-row-no-center' ); ?>">
<?php if ( kadence()->has_mobile_side_columns( $row ) ) { ?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-left site-header-section site-header-section-left">
<?php
/**
* Kadence Render Header Column
*
* Hooked Kadence\mobile_header_column
*/
do_action( 'kadence_render_mobile_header_column', $row, 'left' );
if ( kadence()->has_mobile_center_column( $row ) ) {
/**
* Kadence Render Header Column
*
* Hooked Kadence\mobile_header_column
*/
do_action( 'kadence_render_mobile_header_column', $row, 'left_center' );
}
?>
</div>
<?php } ?>
<?php if ( kadence()->has_mobile_center_column( $row ) ) { ?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-center site-header-section site-header-section-center">
<?php
/**
* Kadence Render Header Column
*
* Hooked Kadence\mobile_header_column
*/
do_action( 'kadence_render_mobile_header_column', $row, 'center' );
?>
</div>
<?php } ?>
<?php if ( kadence()->has_mobile_side_columns( $row ) ) { ?>
<div class="site-header-<?php echo esc_attr( $row ); ?>-section-right site-header-section site-header-section-right">
<?php
if ( kadence()->has_mobile_center_column( $row ) ) {
/**
* Kadence Render Header Column
*
* Hooked Kadence\mobile_header_column
*/
do_action( 'kadence_render_mobile_header_column', $row, 'right_center' );
}
/**
* Kadence Render Header Column
*
* Hooked Kadence\mobile_header_column
*/
do_action( 'kadence_render_mobile_header_column', $row, 'right' );
?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header Mobile HTML Modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_mobile_html">
<?php
/**
* Kadence Mobile Header HTML
*
* Hooked Kadence\mobile_html
*/
do_action( 'kadence_mobile_html' );
?>
</div><!-- data-section="mobile_html" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header branding/logo
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="title_tagline">
<?php
/**
* Kadence Mobile Site Branding
*
* Hooked Kadence\mobile_site_branding
*/
do_action( 'kadence_mobile_site_branding' );
?>
</div><!-- data-section="title_tagline" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header navigation menu
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item site-header-item-mobile-navigation mobile-navigation-layout-stretch-<?php echo ( kadence()->option( 'mobile_navigation_stretch' ) ? 'true' : 'false' ); ?>" data-section="kadence_customizer_mobile_navigation">
<?php
/**
* Kadence Mobile Navigation
*
* Hooked Kadence\mobile_navigation
*/
do_action( 'kadence_mobile_navigation' );
?>
</div><!-- data-section="mobile_navigation" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the mobile header social modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_mobile_social">
<?php
/**
* Kadence Mobile Header Social
*
* Hooked Kadence\mobile_social
*/
do_action( 'kadence_mobile_social' );
?>
</div><!-- data-section="mobile_social" -->

View File

@@ -0,0 +1,57 @@
<?php
/**
* Template part for displaying the Mobile Header
*
* @package kadence
*/
namespace Kadence;
?>
<div id="mobile-header" class="site-mobile-header-wrap">
<div class="site-header-inner-wrap<?php echo esc_attr( 'top_main_bottom' === kadence()->option( 'mobile_header_sticky' ) ? ' kadence-sticky-header' : '' ); ?>"<?php
if ( 'top_main_bottom' === kadence()->option( 'mobile_header_sticky' ) ) {
echo ' data-shrink="' . ( kadence()->option( 'mobile_header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
echo ' data-reveal-scroll-up="' . ( kadence()->option( 'mobile_header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
if ( kadence()->option( 'mobile_header_sticky_shrink' ) ) {
echo ' data-shrink-height="' . esc_attr( kadence()->sub_option( 'mobile_header_sticky_main_shrink', 'size' ) ) . '"';
}
}
?>>
<div class="site-header-upper-wrap">
<div class="site-header-upper-inner-wrap<?php echo esc_attr( 'top_main' === kadence()->option( 'mobile_header_sticky' ) ? ' kadence-sticky-header' : '' ); ?>"<?php
if ( 'top_main' === kadence()->option( 'mobile_header_sticky' ) ) {
echo ' data-shrink="' . ( kadence()->option( 'mobile_header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
echo ' data-reveal-scroll-up="' . ( kadence()->option( 'mobile_header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
if ( kadence()->option( 'mobile_header_sticky_shrink' ) ) {
echo ' data-shrink-height="' . esc_attr( kadence()->sub_option( 'mobile_header_sticky_main_shrink', 'size' ) ) . '"';
}
}
?>>
<?php
/**
* Kadence Top Header
*
* Hooked kadence_mobile_top_header 10
*/
do_action( 'kadence_mobile_top_header' );
/**
* Kadence Main Header
*
* Hooked kadence_mobile_main_header 10
*/
do_action( 'kadence_mobile_main_header' );
?>
</div>
</div>
<?php
/**
* Kadence Mobile Bottom Header
*
* Hooked kadence_mobile_bottom_header 10
*/
do_action( 'kadence_mobile_bottom_header' );
?>
</div>
</div>

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header navigation menu
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item site-header-item-main-navigation header-navigation-layout-stretch-<?php echo ( kadence()->option( 'secondary_navigation_stretch' ) ? 'true' : 'false' ); ?> header-navigation-layout-fill-stretch-<?php echo ( kadence()->option( 'secondary_navigation_fill_stretch' ) ? 'true' : 'false' ); ?>" data-section="kadence_customizer_secondary_navigation">
<?php
/**
* Kadence Secondary Navigation
*
* Hooked Kadence\secondary_navigation
*/
do_action( 'kadence_secondary_navigation' );
?>
</div><!-- data-section="secondary_navigation" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header navigation menu
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item site-header-item-main-navigation header-navigation-layout-stretch-<?php echo ( kadence()->option( 'primary_navigation_stretch' ) ? 'true' : 'false' ); ?> header-navigation-layout-fill-stretch-<?php echo ( kadence()->option( 'primary_navigation_fill_stretch' ) ? 'true' : 'false' ); ?>" data-section="kadence_customizer_primary_navigation">
<?php
/**
* Kadence Primary Navigation
*
* Hooked Kadence\primary_navigation
*/
do_action( 'kadence_primary_navigation' );
?>
</div><!-- data-section="primary_navigation" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header navigation menu
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item site-header-item-navgation-popup-toggle" data-section="kadence_customizer_mobile_trigger">
<?php
/**
* Kadence Mobile Navigation Popup Toggle
*
* Hooked Kadence\navigation_popup_toggle
*/
do_action( 'kadence_navigation_popup_toggle' );
?>
</div><!-- data-section="mobile_trigger" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header Search Modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_header_search">
<?php
/**
* Kadence Header Search
*
* Hooked Kadence\header_search
*/
do_action( 'kadence_header_search' );
?>
</div><!-- data-section="header_search" -->

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying the header Social Modual
*
* @package kadence
*/
namespace Kadence;
?>
<div class="site-header-item site-header-focus-item" data-section="kadence_customizer_header_social">
<?php
/**
* Kadence Header Social
*
* Hooked Kadence\header_social
*/
do_action( 'kadence_header_social' );
?>
</div><!-- data-section="header_social" -->

View File

@@ -0,0 +1,17 @@
<?php
/**
* Template part for displaying a post's title
*
* @package kadence
*/
namespace Kadence;
$html_tag = 'span';
if ( is_singular( 'product' ) ) {
$title_element = kadence()->option( 'product_content_element_title' );
if ( isset( $title_element ) && is_array( $title_element ) && false === $title_element['enabled'] ) {
$html_tag = 'h1';
}
}
the_title( '<' . $html_tag . ' class="extra-title">', '</' . $html_tag . '>' );

View File

@@ -0,0 +1,20 @@
<?php
/**
* Template part for displaying an events back link
*
* @package kadence
*/
namespace Kadence;
use function tribe_get_event_label_plural;
use function tribe_get_events_link;
$label = esc_html_x( 'All %s', '%s Events plural label', 'kadence' );
$events_label_plural = tribe_get_event_label_plural();
?>
<p class="tribe-events-back">
<a href="<?php echo esc_url( tribe_get_events_link() ); ?>">
&laquo; <?php printf( $label, $events_label_plural ); ?>
</a>
</p>

View File

@@ -0,0 +1,18 @@
<?php
/**
* Template part for displaying a post's breadcrumb.
*
* @package kadence
*/
namespace Kadence;
$item_type = get_post_type();
$elements = kadence()->option( $item_type . '_title_element_breadcrumb' );
$args = array( 'show_title' => true );
if ( isset( $elements ) && is_array( $elements ) ) {
if ( isset( $elements['show_title'] ) && ! $elements['show_title'] ) {
$args['show_title'] = false;
}
}
kadence()->print_breadcrumb( $args );

View File

@@ -0,0 +1,44 @@
<?php
/**
* Template part for displaying a post's category terms
*
* @package kadence
*/
namespace Kadence;
$elements = kadence()->option( get_post_type() . '_title_element_categories' );
if ( isset( $elements ) && is_array( $elements ) && true === $elements['enabled'] ) {
$tax_slug = ( isset( $elements['taxonomy'] ) && ! empty( $elements['taxonomy'] ) ? $elements['taxonomy'] : 'category' );
if ( has_term( '', $tax_slug ) ) {
$divider = ( isset( $elements['divider'] ) && ! empty( $elements['divider'] ) ? $elements['divider'] : 'vline' );
$style = ( isset( $elements['style'] ) && ! empty( $elements['style'] ) ? $elements['style'] : 'normal' );
switch ( $divider ) {
case 'dot':
$separator = ' &middot; ';
break;
case 'slash':
/* translators: separator between taxonomy terms */
$separator = _x( ' / ', 'list item separator', 'kadence' );
break;
case 'dash':
/* translators: separator between taxonomy terms */
$separator = _x( ' - ', 'list item separator', 'kadence' );
break;
default:
/* translators: separator between taxonomy terms */
$separator = _x( ' | ', 'list item separator', 'kadence' );
break;
}
if ( 'pill' === $style ) {
$separator = ' ';
}
?>
<div class="entry-taxonomies">
<span class="category-links term-links category-style-<?php echo esc_attr( $style ); ?>">
<?php echo get_the_term_list( get_the_ID(), $tax_slug, '', esc_html( $separator ), '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span>
</div><!-- .entry-taxonomies -->
<?php
}
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Template part for displaying a post's category terms
*
* @package kadence
*/
namespace Kadence;
use WPSEO_Primary_Term;
global $post;
$main_term = false;
if ( class_exists( 'WPSEO_Primary_Term' ) ) {
$wpseo_term = new WPSEO_Primary_Term( 'product_cat', $post->ID );
$wpseo_term = $wpseo_term->get_primary_term();
$wpseo_term = get_term( $wpseo_term );
if ( is_wp_error( $wpseo_term ) ) {
$main_term = false;
} else {
$main_term = $wpseo_term;
}
} elseif ( class_exists( 'RankMath' ) ) {
$wpseo_term = get_post_meta( $post->ID, 'rank_math_primary_product_cat', true );
if ( $wpseo_term ) {
$wpseo_term = get_term( $wpseo_term );
if ( is_wp_error( $wpseo_term ) ) {
$main_term = false;
} else {
$main_term = $wpseo_term;
}
} else {
$main_term = false;
}
}
if ( false === $main_term ) {
$main_term = '';
$terms = wp_get_post_terms(
$post->ID,
'product_cat',
array(
'orderby' => 'parent',
'order' => 'DESC',
)
);
if ( $terms && ! is_wp_error( $terms ) ) {
if ( is_array( $terms ) ) {
$main_term = $terms[0];
}
}
}
if ( $main_term ) {
$term_title = $main_term->name;
echo '<div class="entry-taxonomies">';
echo '<a href="' . esc_attr( get_term_link( $main_term->slug, 'product_cat' ) ) . '" class="product-above-category single-category">';
echo esc_html( $term_title );
echo '</a>';
echo '</div>';
}

View File

@@ -0,0 +1,18 @@
<?php
/**
* Template part for displaying a search.
*
* @package kadence
*/
namespace Kadence;
if ( function_exists( 'is_bbpress' ) && is_bbpress() ) {
echo '<div class="title-entry-description bbp-forum-content">';
bbp_forum_content();
echo '</div><!-- .title-entry-description -->';
} else {
echo '<div class="title-entry-excerpt">';
the_excerpt();
echo '</div><!-- .title-entry-excerpt -->';
}

View File

@@ -0,0 +1,13 @@
<?php
/**
* Template part for displaying a post's excerpt.
*
* @package kadence
*/
namespace Kadence;
?>
<div class="title-entry-excerpt">
<?php the_excerpt(); ?>
</div><!-- .title-entry-excerpt -->

View File

@@ -0,0 +1,10 @@
<?php
/**
* Template part for displaying a post's metadata
*
* @package kadence
*/
namespace Kadence;
do_action( 'kadence_single_title_info_area' );

View File

@@ -0,0 +1,304 @@
<?php
/**
* Template part for displaying a post's metadata
*
* @package kadence
*/
namespace Kadence;
global $post;
$item_type = get_post_type();
$elements = kadence()->option( $item_type . '_title_element_meta' );
$title_meta = array();
$meta_labels = array();
$meta_divider = 'dot';
$author_image = false;
$author_link = true;
$author_image_size = 25;
if ( isset( $elements ) && is_array( $elements ) ) {
if ( isset( $elements['divider'] ) && $elements['divider'] ) {
$meta_divider = $elements['divider'];
}
if ( isset( $elements['author'] ) && $elements['author'] ) {
$title_meta[] = 'author';
if ( isset( $elements['authorEnableLabel'] ) && $elements['authorEnableLabel'] ) {
$meta_labels['author'] = ( isset( $elements['authorLabel'] ) && ! empty( $elements['authorLabel'] ) ? $elements['authorLabel'] : __( 'By', 'kadence' ) );
}
if ( isset( $elements['authorImage'] ) && $elements['authorImage'] ) {
$author_image = true;
}
if ( isset( $elements['authorLink'] ) && ! $elements['authorLink'] ) {
$author_link = false;
}
if ( isset( $elements['authorImageSize'] ) && $elements['authorImageSize'] ) {
$author_image_size = absint( $elements['authorImageSize'] );
}
}
if ( isset( $elements['date'] ) && $elements['date'] ) {
if ( isset( $elements['dateTime'] ) && $elements['dateTime'] ) {
$title_meta[] = 'dateTime';
} else {
$title_meta[] = 'date';
}
if ( isset( $elements['dateEnableLabel'] ) && $elements['dateEnableLabel'] ) {
$meta_labels['date'] = ( isset( $elements['dateLabel'] ) && ! empty( $elements['dateLabel'] ) ? $elements['dateLabel'] : __( 'Posted on', 'kadence' ) );
}
}
if ( isset( $elements['dateUpdated'] ) && $elements['dateUpdated'] ) {
if ( isset( $elements['dateUpdatedTime'] ) && $elements['dateUpdatedTime'] ) {
$title_meta[] = 'dateUpdatedTime';
} else {
$title_meta[] = 'dateUpdated';
}
if ( isset( $elements['dateUpdatedEnableLabel'] ) && $elements['dateUpdatedEnableLabel'] ) {
$meta_labels['dateUpdated'] = ( isset( $elements['dateUpdatedLabel'] ) && ! empty( $elements['dateUpdatedLabel'] ) ? $elements['dateUpdatedLabel'] : __( 'Updated on', 'kadence' ) );
}
}
if ( isset( $elements['categories'] ) && $elements['categories'] ) {
$title_meta[] = 'categories';
if ( isset( $elements['categoriesEnableLabel'] ) && $elements['categoriesEnableLabel'] ) {
$meta_labels['categories'] = ( isset( $elements['categoriesLabel'] ) && ! empty( $elements['categoriesLabel'] ) ? $elements['categoriesLabel'] : __( 'Posted in', 'kadence' ) );
}
}
if ( isset( $elements['comments'] ) && $elements['comments'] ) {
$title_meta[] = 'comments';
}
}
if ( empty( $title_meta ) ) {
return;
}
$item_id = get_the_ID();
$post_type_obj = get_post_type_object( get_post_type() );
?>
<div class="entry-meta entry-meta-divider-<?php echo esc_attr( $meta_divider ); ?>">
<?php
do_action( 'kadence_before_entry_meta' );
foreach ( $title_meta as $title_meta_item ) {
switch ( $title_meta_item ) {
case 'author':
$author_string = '';
// Show author only if the post type supports it.
if ( post_type_supports( $post_type_obj->name, 'author' ) ) {
$author_id = get_post_field( 'post_author', get_the_ID() );
if ( $author_link ) {
if ( get_the_author_meta( 'url' ) && apply_filters( 'kadence_author_use_profile_link', true ) ) {
$author_string = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_the_author_meta( 'url', $author_id ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
} else {
$author_string = sprintf(
'<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_author_posts_url( $author_id ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
}
} else {
$author_string = sprintf(
'<span class="author vcard"><span class="fn n">%1$s</span></span>',
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
}
}
if ( ! empty( $author_string ) ) {
$author_output = '<span class="posted-by">';
if ( $author_image ) {
$author_output .= '<span class="author-avatar"' . ( $author_image_size && 25 !== $author_image_size ? ' style="width:' . esc_attr( $author_image_size ) . 'px; height:' . esc_attr( $author_image_size ) . 'px;"' : '' ) . '>';
if ( $author_link ) {
if ( get_the_author_meta( 'url' ) && apply_filters( 'kadence_author_use_profile_link', true ) ) {
$author_output .= sprintf(
'<a class="author-image" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( get_the_author_meta( 'url', $author_id ) ),
esc_attr__( 'Author image', 'kadence' ),
get_avatar( $author_id, ( 2 * $author_image_size ) )
);
} else {
$author_output .= sprintf(
'<a class="author-image" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( get_author_posts_url( $author_id ) ),
esc_attr__( 'Author image', 'kadence' ),
get_avatar( $author_id, $author_image_size )
);
}
} else {
$author_output .= sprintf(
'<span class="author-image">%1$s</span>',
get_avatar( $author_id, $author_image_size )
);
}
$author_output .= '<span class="image-size-ratio"></span>';
$author_output .= '</span>';
}
if ( isset( $meta_labels['author'] ) ) {
$author_output .= '<span class="meta-label">' . esc_html( $meta_labels['author'] ) . '</span>';
}
$author_output .= $author_string;
$author_output .= '</span>';
echo apply_filters( 'kadence_author_meta_output', $author_output ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
break;
case 'date':
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time><time class="updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
if ( ! empty( $time_string ) ) {
?>
<span class="posted-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['date'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['date'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateTime':
$time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s %3$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s %3$s</time><time class="updated" datetime="%4$s" itemprop="dateModified">%5$s %6$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_html( get_the_time() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
esc_html( get_the_modified_time() )
);
if ( ! empty( $time_string ) ) {
?>
<span class="posted-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['date'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['date'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateUpdated':
if ( isset( $elements['dateUpdatedDifferent'] ) && $elements['dateUpdatedDifferent'] && get_the_date() === get_the_modified_date() ) {
$time_string = '';
} else {
$time_string = sprintf(
'<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s</time>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
}
if ( ! empty( $time_string ) ) {
?>
<span class="updated-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['dateUpdated'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['dateUpdated'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'dateUpdatedTime':
$publish_time = get_the_time( 'U' ) + ( 60 * 5 );
if ( isset( $elements['dateUpdatedDifferent'] ) && $elements['dateUpdatedDifferent'] && $publish_time > get_the_modified_time( 'U' ) ) {
$time_string = '';
} else {
$time_string = sprintf(
'<time class="entry-date published updated" datetime="%1$s" itemprop="dateModified">%2$s %3$s</time>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
esc_html( get_the_modified_time() )
);
}
if ( ! empty( $time_string ) ) {
?>
<span class="updated-on">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'hoursAlt', '', false );
}
if ( isset( $meta_labels['dateUpdated'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['dateUpdated'] ) . '</span>';
}
echo $time_string; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'categories':
if ( 'post' === get_post_type() ) {
/* translators: separator between taxonomy terms */
$separator = _x( ', ', 'list item separator', 'kadence' );
?>
<span class="category-links">
<?php
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'folder', '', false );
}
if ( isset( $meta_labels['categories'] ) ) {
echo '<span class="meta-label">' . esc_html( $meta_labels['categories'] ) . '</span>';
}
echo '<span class="category-link-items">' . get_the_category_list( esc_html( $separator ), '', get_the_ID() ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</span>
<?php
}
break;
case 'comments':
$show = true;
if ( isset( $elements['commentsCondition'] ) && $elements['commentsCondition'] && 0 == get_comments_number() ) {
$show = false;
}
if ( $show ) {
if ( kadence()->show_comments() ) {
echo '<div class="meta-comments">';
if ( 'customicon' === $meta_divider ) {
kadence()->print_icon( 'commentsAlt', '', false );
}
echo '<a class="meta-comments-link anchor-scroll" href="#comments">';
if ( '1' === get_comments_number() ) {
echo esc_html( get_comments_number() ) . ' ' . esc_html__( 'Comment', 'kadence' );
} else {
echo esc_html( get_comments_number() ) . ' ' . esc_html__( 'Comments', 'kadence' );
}
echo '</a>';
echo '</div>';
}
}
break;
}
}
do_action( 'kadence_after_entry_meta' );
?>
</div><!-- .entry-meta -->
<?php

View File

@@ -0,0 +1,14 @@
<?php
/**
* Template part for displaying a search.
*
* @package kadence
*/
namespace Kadence;
if ( function_exists( 'is_bbpress' ) && is_bbpress() ) {
bbp_get_template_part( 'form', 'search' );
} else {
get_search_form();
}

View File

@@ -0,0 +1,12 @@
<?php
/**
* Template part for displaying a post's title
*
* @package kadence
*/
namespace Kadence;
do_action( 'kadence_single_before_entry_title' );
the_title( '<h1 class="entry-title">', '</h1>' );
do_action( 'kadence_single_after_entry_title' );