File: /disk001/machen/public_html/support/wp-content/themes/wp-moose/template-parts/content.php
<?php
$layout_styles = array(
'archive-left' => 'sm:card-horizontal',
'archive-right' => 'sm:card-horizontal-reverse',
'archive-grid' => 'sm:card-horizontal',
);
$post_class = wp_moose_clsx( array(
'card rounded-md text-base-content h-full',
get_wp_moose_posts_container_style(),
$layout_styles[get_wp_moose_option( 'wp_moose_posts_layout' )],
'card-overlay' => is_sticky()
) );
$wrap_class = array( 'p-half-gutter' );
$grid_style = get_wp_moose_grid_layout_columns_style();
$wrap_class['w-full'] = $grid_style == '' || is_sticky();
$wrap_class[$grid_style] = !is_sticky();
$post_structure = array(
'title',
'metas',
'excerpt',
'category',
'read-more'
);
$metas = array(
'byline',
'posted_on',
'comments',
'views'
);
?>
<div class="<?php
wp_moose_clsx_echo( $wrap_class );
?>">
<article id="post-<?php
the_ID();
?>" <?php
post_class( $post_class );
?>>
<?php
if ( has_post_thumbnail() && get_wp_moose_option( 'wp_moose_show_archive_feature_image' ) ) {
?>
<a class="card-image" href="<?php
the_permalink();
?>"
style="<?php
echo esc_attr( wp_moose_list_archive_image_style() ) ;
?>">
<?php
the_post_thumbnail( 'wp-moose-feature', [
'class' => '',
] );
?>
</a>
<?php
}
?>
<div class="card-body p-gutter">
<?php
foreach ( $post_structure as $item ) {
?>
<?php
if ( $item === 'title' ) {
?>
<h2 class="card-title last:mb-0">
<a class="link link-ltr" href="<?php
echo esc_url( get_permalink() ) ;
?>" rel="bookmark">
<?php
the_title();
?>
</a>
<span class="link text-xs">
<?php
edit_post_link( esc_html__( 'Edit', 'wp-moose' ) );
?>
</span>
</h2>
<?php
}
?>
<?php
if ( $item === 'metas' ) {
?>
<div class="card-metas last:mb-0">
<?php
wp_moose_post_meta( $metas );
?>
</div>
<?php
}
?>
<?php
if ( $item === 'excerpt' ) {
?>
<p class="card-text last:mb-0">
<?php
echo get_the_excerpt() ;
?>
</p>
<?php
}
?>
<?php
if ( $item === 'category' ) {
?>
<?php
wp_moose_post_categories( '<div class="mb-4 last:mb-0">', '</div>', 'mr-2 badge badge-pill badge-ghost' );
?>
<?php
}
?>
<?php
if ( $item === 'read-more' ) {
?>
<div class="flex-grow items-end mb-4 last:mb-0">
<a class="btn <?php
wp_moose_button_style();
?>" href="<?php
the_permalink();
?>" rel="bookmark">
<?php
echo get_wp_moose_option( 'wp_moose_read_more_text' ) ;
?>
</a>
</div>
<?php
}
?>
<?php
}
?>
</div>
</article>
</div>